abidlabs HF staff commited on
Commit
e3f45be
1 Parent(s): 1e21ab1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -7,9 +7,11 @@ nlp = pipeline(
7
  )
8
 
9
  def predict(img, text):
10
- return nlp(
11
  img,
12
  text
13
- )['answer']
 
 
14
 
15
  gr.Interface(predict, [gr.Image(type="filepath"), gr.Textbox(label="Question")], gr.Textbox()).launch()
 
7
  )
8
 
9
  def predict(img, text):
10
+ prediction = nlp(
11
  img,
12
  text
13
+ )
14
+ print(prediction)
15
+ return prediction['answer']
16
 
17
  gr.Interface(predict, [gr.Image(type="filepath"), gr.Textbox(label="Question")], gr.Textbox()).launch()