Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def predict(image):
|
|
72 |
prompt_ids = torch.tensor(prompt_ids).unsqueeze(0)
|
73 |
|
74 |
text_ids = vqa_model.generate(pixel_values=pixel_values, input_ids=prompt_ids, max_length=50)
|
75 |
-
text = vqa_processor.batch_decode(text_ids, skip_special_tokens=True)
|
76 |
|
77 |
audio = tts(text)
|
78 |
|
|
|
72 |
prompt_ids = torch.tensor(prompt_ids).unsqueeze(0)
|
73 |
|
74 |
text_ids = vqa_model.generate(pixel_values=pixel_values, input_ids=prompt_ids, max_length=50)
|
75 |
+
text = vqa_processor.batch_decode(text_ids, skip_special_tokens=True)[0][len(prompt):]
|
76 |
|
77 |
audio = tts(text)
|
78 |
|