mixklim commited on
Commit
d842fb9
·
verified ·
1 Parent(s): 37e1eef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -15,9 +15,12 @@ def launch(pil_image, question):
15
  out = model.generate(**inputs)
16
  return processor.decode(out[0], skip_special_tokens=True)
17
 
18
- iface = gr.Interface(launch,
19
  inputs=[gr.Image(label="Input image", type='pil'),
20
  gr.Textbox(label="Question", lines=3)],
21
- outputs=gr.Textbox(label="Answer", lines=3))
 
 
 
22
 
23
  iface.launch()
 
15
  out = model.generate(**inputs)
16
  return processor.decode(out[0], skip_special_tokens=True)
17
 
18
+ iface = gr.Interface(fn=launch,
19
  inputs=[gr.Image(label="Input image", type='pil'),
20
  gr.Textbox(label="Question", lines=3)],
21
+ outputs=gr.Textbox(label="Answer", lines=3),
22
+ title="Image Q&A with Salesforce BLIP",
23
+ description="Get answers on questions about any image using the BLIP model",
24
+ allow_flagging="never",
25
 
26
  iface.launch()