rockdrigoma commited on
Commit
4366f76
·
1 Parent(s): 83cefeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ tokenizer = AutoTokenizer.from_pretrained('hackathon-pln-es/t5-small-spanish-nah
15
 
16
  def predict(input):
17
  input_ids = tokenizer('translate Spanish to Nahuatl: ' + input, return_tensors='pt').input_ids
18
- outputs = model.generate(input_ids)
19
  outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
20
  return outputs
21
 
 
15
 
16
  def predict(input):
17
  input_ids = tokenizer('translate Spanish to Nahuatl: ' + input, return_tensors='pt').input_ids
18
+ outputs = model.generate(input_ids, max_length=512)
19
  outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
20
  return outputs
21