Update app.py
Browse files
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()
|