ronniet commited on
Commit
0349c26
1 Parent(s): ce16067

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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