meinvirgos commited on
Commit
12b70c7
·
verified ·
1 Parent(s): f366264

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)