AlbertDuvan commited on
Commit
89d98f5
·
verified ·
1 Parent(s): 09461d3

Upload 2 files

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -65,7 +65,10 @@ def generar_respuesta(pregunta):
65
  ).to("cpu")
66
 
67
  with torch.no_grad():
68
- outputs = model.generate(**inputs, max_length=100) # Reducir max_length para mayor velocidad
 
 
 
69
 
70
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
71
 
 
65
  ).to("cpu")
66
 
67
  with torch.no_grad():
68
+ outputs = model.generate(
69
+ **inputs,
70
+ max_new_tokens=100 # Generar hasta 100 tokens adicionales
71
+ )
72
 
73
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
74