oscmansan commited on
Commit
af1d4d5
1 Parent(s): 38f62a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -21,7 +21,8 @@ def predict(image: Image.Image, question: str) -> str:
21
  generated_ids = model.generate(
22
  pixel_values=pixel_values,
23
  input_ids=input_ids,
24
- max_new_tokens=50
 
25
  )
26
 
27
  answer = model.text_processor.batch_decode(generated_ids, skip_special_tokens=True)[0].strip()
 
21
  generated_ids = model.generate(
22
  pixel_values=pixel_values,
23
  input_ids=input_ids,
24
+ max_new_tokens=100,
25
+ num_beams=5
26
  )
27
 
28
  answer = model.text_processor.batch_decode(generated_ids, skip_special_tokens=True)[0].strip()