Spaces:
Runtime error
Runtime error
tlodato
commited on
Commit
·
2246470
1
Parent(s):
335893e
update
Browse files
app.py
CHANGED
|
@@ -23,16 +23,15 @@ css = """
|
|
| 23 |
"""
|
| 24 |
|
| 25 |
with gr.Blocks(css=css) as demo:
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
text_input = gr.Textbox(label="Ask a Question")
|
| 30 |
-
vqa_output = gr.Textbox(label="Output")
|
| 31 |
vqa_btn = gr.Button("Answer Visual Question")
|
| 32 |
vqa_btn.click(
|
| 33 |
fn=vqa,
|
| 34 |
-
inputs = [
|
| 35 |
outputs = vqa_output
|
| 36 |
)
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
| 23 |
"""
|
| 24 |
|
| 25 |
with gr.Blocks(css=css) as demo:
|
| 26 |
+
image_input = gr.Image(label="Upload your Image", type="pil")
|
| 27 |
+
text_input = gr.Textbox(label="Ask a Question")
|
| 28 |
+
vqa_output = gr.Textbox(label="Output")
|
|
|
|
|
|
|
| 29 |
vqa_btn = gr.Button("Answer Visual Question")
|
| 30 |
vqa_btn.click(
|
| 31 |
fn=vqa,
|
| 32 |
+
inputs = [filepath,question],
|
| 33 |
outputs = vqa_output
|
| 34 |
)
|
| 35 |
|
| 36 |
+
if __name__ == "__main__":
|
| 37 |
+
demo.launch()
|