oshita-n commited on
Commit
0f3dfdc
·
1 Parent(s): 0bdd763
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -12,11 +12,10 @@ def process(input_image, prompt):
12
  text_input = txt_processors["eval"](prompt)
13
  sample = {"image": image, "text_input": [text_input]}
14
 
15
- output = model.forward_itm(samples=sample)
16
- pred_answers = output['pred_answers']
17
- answer = pred_answers[0]
18
 
19
- return answer
20
 
21
  if __name__ == '__main__':
22
  input_image = gr.inputs.Image(label='image', type='pil')
 
12
  text_input = txt_processors["eval"](prompt)
13
  sample = {"image": image, "text_input": [text_input]}
14
 
15
+ output = model.forward_qa(samples=sample)
16
+ pred_answers = output[0]
 
17
 
18
+ return pred_answer
19
 
20
  if __name__ == '__main__':
21
  input_image = gr.inputs.Image(label='image', type='pil')