oshita-n commited on
Commit
9d6822a
·
1 Parent(s): 577ce6a
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -11,9 +11,7 @@ def process(input_image, prompt):
11
  image = vis_processors["eval"](input_image).unsqueeze(0).to(device)
12
  text_input = txt_processors["eval"](prompt)
13
  sample = {"image": image, "text_input": [text_input]}
14
-
15
- output = model.forward_qa(samples=sample, num_captions=50)
16
- pred_answers = output[0]
17
 
18
  return pred_answer
19
 
 
11
  image = vis_processors["eval"](input_image).unsqueeze(0).to(device)
12
  text_input = txt_processors["eval"](prompt)
13
  sample = {"image": image, "text_input": [text_input]}
14
+ pred_answers, caption, gradcam = model.predict_answers(sample, num_captions=50, num_patches=20)
 
 
15
 
16
  return pred_answer
17