komleva commited on
Commit
5a9d005
·
1 Parent(s): 1a97377

Add gitignore

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -169,7 +169,7 @@ def open_domain_vqa(Image, Question):
169
  left = left -10
170
 
171
 
172
- return Image.crop((left, top, right, bottom)), result[0]['answer']
173
 
174
 
175
  title = "Visual Question Answering"
@@ -177,7 +177,7 @@ description = " Demo for Visual Question Answering. That model achieved 3rd plac
177
  #article = "<p style='text-align: center'><a href='https://github.com/OFA-Sys/OFA' target='_blank'>OFA Github " \
178
  # "Repo</a></p> "
179
  examples = [['demo_imgs/000000001093.jpg', 'Which is different from the group?'], ['demo_imgs/000000001964.jpg','What do we drive for personal use?'], ['demo_imgs/000000002473.jpg','What do we use to slide on snow?']]
180
- io = gr.Interface(fn=open_domain_vqa, inputs=[gr.inputs.Image(type='pil'), "textbox"], outputs=[gr.outputs.Image(type='pil'),gr.outputs.Textbox(label="Answer")],
181
  title=title, description=description, examples=examples,
182
  allow_flagging=False, allow_screenshot=False)
183
  io.launch()
 
169
  left = left -10
170
 
171
 
172
+ return Image.crop((left, top, right, bottom))#, result[0]['answer']
173
 
174
 
175
  title = "Visual Question Answering"
 
177
  #article = "<p style='text-align: center'><a href='https://github.com/OFA-Sys/OFA' target='_blank'>OFA Github " \
178
  # "Repo</a></p> "
179
  examples = [['demo_imgs/000000001093.jpg', 'Which is different from the group?'], ['demo_imgs/000000001964.jpg','What do we drive for personal use?'], ['demo_imgs/000000002473.jpg','What do we use to slide on snow?']]
180
+ io = gr.Interface(fn=open_domain_vqa, inputs=[gr.inputs.Image(type='pil'), "textbox"], outputs=gr.outputs.Image(type='pil'),
181
  title=title, description=description, examples=examples,
182
  allow_flagging=False, allow_screenshot=False)
183
  io.launch()