indiejoseph
commited on
Commit
·
0b677af
1
Parent(s):
8922827
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -19,7 +19,7 @@ class EndpointHandler:
|
|
19 |
decoder_file_name="decoder_model_quantized.onnx",
|
20 |
decoder_file_with_past_name="decoder_with_past_model_quantized.onnx",
|
21 |
)
|
22 |
-
self.pipe = TranslationPipeline(self.model, self.tokenizer)
|
23 |
self.translator = Translator(self.pipe, max_length=512, batch_size=1)
|
24 |
|
25 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
|
|
19 |
decoder_file_name="decoder_model_quantized.onnx",
|
20 |
decoder_file_with_past_name="decoder_with_past_model_quantized.onnx",
|
21 |
)
|
22 |
+
self.pipe = TranslationPipeline(self.model, self.tokenizer, do_sample=False, num_beams=1)
|
23 |
self.translator = Translator(self.pipe, max_length=512, batch_size=1)
|
24 |
|
25 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|