Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def translation(source, target, text):
|
|
29 |
if source != flores_codes["Castellano"]:
|
30 |
translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=source, tgt_lang=flores_codes["Castellano"])
|
31 |
texto_castellano = translator(text, max_length=400)
|
32 |
-
translator_ast = pipeline('translation', model=model_ast, tokenizer=tokenizer)
|
33 |
output = translator_ast(text, max_length=400)
|
34 |
else:
|
35 |
translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=source, tgt_lang=target)
|
|
|
29 |
if source != flores_codes["Castellano"]:
|
30 |
translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=source, tgt_lang=flores_codes["Castellano"])
|
31 |
texto_castellano = translator(text, max_length=400)
|
32 |
+
translator_ast = pipeline('translation', model=model_ast, tokenizer=tokenizer, src_lang=flores_codes["Castellano"], tgt_lang=flores_codes["Asturianu"])
|
33 |
output = translator_ast(text, max_length=400)
|
34 |
else:
|
35 |
translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=source, tgt_lang=target)
|