Update app.py
Browse files
app.py
CHANGED
@@ -20,17 +20,17 @@ if text:
|
|
20 |
**model_inputs,
|
21 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["hi_IN"]
|
22 |
)
|
23 |
-
|
24 |
generated_tokens = model_translation.generate(
|
25 |
**model_inputs,
|
26 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["te_IN"]
|
27 |
)
|
28 |
-
|
29 |
generated_tokens = model_translation.generate(
|
30 |
**model_inputs,
|
31 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["gu_IN"]
|
32 |
)
|
33 |
-
|
34 |
generated_tokens = model_translation.generate(
|
35 |
**model_inputs,
|
36 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["bn_IN"]
|
|
|
20 |
**model_inputs,
|
21 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["hi_IN"]
|
22 |
)
|
23 |
+
elif lg==2:
|
24 |
generated_tokens = model_translation.generate(
|
25 |
**model_inputs,
|
26 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["te_IN"]
|
27 |
)
|
28 |
+
elif lg==3:
|
29 |
generated_tokens = model_translation.generate(
|
30 |
**model_inputs,
|
31 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["gu_IN"]
|
32 |
)
|
33 |
+
elif lg==4:
|
34 |
generated_tokens = model_translation.generate(
|
35 |
**model_inputs,
|
36 |
forced_bos_token_id=tokenizer_translation.lang_code_to_id["bn_IN"]
|