update handler
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -39,7 +39,7 @@ class EndpointHandler():
|
|
39 |
"""
|
40 |
|
41 |
inputs = data.pop("inputs", data)
|
42 |
-
|
43 |
-
with torch.no_grad():
|
44 |
prediction = self.pipeline(inputs, generate_kwargs={"forced_decoder_ids": self.forced_decoder_ids}, max_new_tokens=255)
|
|
|
45 |
return prediction
|
|
|
39 |
"""
|
40 |
|
41 |
inputs = data.pop("inputs", data)
|
42 |
+
with torch.cuda.amp.autocast():
|
|
|
43 |
prediction = self.pipeline(inputs, generate_kwargs={"forced_decoder_ids": self.forced_decoder_ids}, max_new_tokens=255)
|
44 |
+
# prediction = self.pipeline(inputs, return_timestamps=False)
|
45 |
return prediction
|