Update app.py
Browse files
app.py
CHANGED
|
@@ -66,8 +66,8 @@ class Translators:
|
|
| 66 |
translator = Translator(str(model_path), device = device)
|
| 67 |
# translation = Translator(f"./quickmt-{self.sl}-{self.tl}/", device="auto", inter_threads=2)
|
| 68 |
# set beam size to 1 for faster speed (but lower quality)
|
| 69 |
-
translation = translator(input_text, beam_size=5)
|
| 70 |
-
print(model_path, input_text)
|
| 71 |
return translation
|
| 72 |
|
| 73 |
@staticmethod
|
|
|
|
| 66 |
translator = Translator(str(model_path), device = device)
|
| 67 |
# translation = Translator(f"./quickmt-{self.sl}-{self.tl}/", device="auto", inter_threads=2)
|
| 68 |
# set beam size to 1 for faster speed (but lower quality)
|
| 69 |
+
translation = translator(input_text, beam_size=5)
|
| 70 |
+
print(model_path, input_text, translation)
|
| 71 |
return translation
|
| 72 |
|
| 73 |
@staticmethod
|