vteam27 commited on
Commit
80ae4f4
·
1 Parent(s): af923d2
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,8 +20,8 @@ def run_t2tt(input_text: str, source_language: str, target_language: str) -> str
20
  source_language_code = LANGUAGE_NAME_TO_CODE[source_language]
21
  target_language_code = LANGUAGE_NAME_TO_CODE[target_language]
22
  text_inputs = processor(text = input_text, src_lang=source_language_code , return_tensors="pt")
23
- output = model.generate(**text_inputs, tgt_lang=target_language_code)
24
- output_tokens = processor.decode(output_tokens[0].tolist(), skip_special_tokens=True)
25
  return str(output)
26
 
27
 
 
20
  source_language_code = LANGUAGE_NAME_TO_CODE[source_language]
21
  target_language_code = LANGUAGE_NAME_TO_CODE[target_language]
22
  text_inputs = processor(text = input_text, src_lang=source_language_code , return_tensors="pt")
23
+ output_tokens = model.generate(**text_inputs, tgt_lang=target_language_code)
24
+ output = processor.decode(output_tokens[0].tolist(), skip_special_tokens=True)
25
  return str(output)
26
 
27