Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def translation(source, target, text):
|
|
32 |
texto_castellano = translator(text, max_length=400)
|
33 |
translator_ast = pipeline('translation', model=model_ast, tokenizer=tokenizer_ast)
|
34 |
output = translator_ast(text, max_length=400)
|
35 |
-
else
|
36 |
translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=source, tgt_lang=target)
|
37 |
output = translator(text, max_length=400)
|
38 |
|
@@ -63,6 +63,7 @@ if __name__ == '__main__':
|
|
63 |
|
64 |
description = """
|
65 |
Este traductor utiliza el siguiente modelo de lenguaje de Meta: https://github.com/facebookresearch/fairseq/tree/nllb\n
|
|
|
66 |
Adaptado de: https://huggingface.co/spaces/Azwaw/Text_Translation_Multi-languages
|
67 |
"""
|
68 |
|
|
|
32 |
texto_castellano = translator(text, max_length=400)
|
33 |
translator_ast = pipeline('translation', model=model_ast, tokenizer=tokenizer_ast)
|
34 |
output = translator_ast(text, max_length=400)
|
35 |
+
else:
|
36 |
translator = pipeline('translation', model=model, tokenizer=tokenizer, src_lang=source, tgt_lang=target)
|
37 |
output = translator(text, max_length=400)
|
38 |
|
|
|
63 |
|
64 |
description = """
|
65 |
Este traductor utiliza el siguiente modelo de lenguaje de Meta: https://github.com/facebookresearch/fairseq/tree/nllb\n
|
66 |
+
Excepto para traducir al asturiano que usa el modelo del proyecto AINA: https://huggingface.co/projecte-aina/aina-translator-es-ast\n
|
67 |
Adaptado de: https://huggingface.co/spaces/Azwaw/Text_Translation_Multi-languages
|
68 |
"""
|
69 |
|