TiberiuCristianLeon commited on
Commit
38bab31
·
verified ·
1 Parent(s): 6a2de9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ 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, compute_type="float16")
70
  # print(model_path, input_text, translation)
71
  return translation
72
 
 
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, max_input_length = 512, max_decoding_length = 512)
70
  # print(model_path, input_text, translation)
71
  return translation
72