milmor commited on
Commit
333c807
·
1 Parent(s): 13435f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -94,7 +94,7 @@ model = AutoModelForSeq2SeqLM.from_pretrained('hackathon-pln-es/t5-small-spanish
94
  tokenizer = AutoTokenizer.from_pretrained('hackathon-pln-es/t5-small-spanish-nahuatl')
95
 
96
  def predict(input):
97
- input_ids = tokenizer('translate Spanish to Nahuatl: ' + input.capitalize(), return_tensors='pt').input_ids
98
  outputs = model.generate(input_ids, max_length=512)
99
  outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
100
  return outputs
 
94
  tokenizer = AutoTokenizer.from_pretrained('hackathon-pln-es/t5-small-spanish-nahuatl')
95
 
96
  def predict(input):
97
+ input_ids = tokenizer('translate Spanish to Nahuatl: ' + input, return_tensors='pt').input_ids
98
  outputs = model.generate(input_ids, max_length=512)
99
  outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
100
  return outputs