Spaces:
Paused
Paused
Update app.py
Browse files
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=
|
|
|
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()
|