Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def alternate_translation(translation_model, translation_tokenizer, inputs):
|
|
28 |
|
29 |
answer = ""
|
30 |
# for
|
31 |
-
translated_tokens = translation_model.generate(**tokenized_inputs, forced_bos_token_id=
|
32 |
return translation_tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
|
33 |
|
34 |
|
|
|
28 |
|
29 |
answer = ""
|
30 |
# for
|
31 |
+
translated_tokens = translation_model.generate(**tokenized_inputs, forced_bos_token_id=translation_tokenizer.convert_tokens_to_ids("eng_Latn"), max_length=100)
|
32 |
return translation_tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
|
33 |
|
34 |
|