Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,19 @@ def infer(image_in, question):
|
|
11 |
print(result)
|
12 |
return result
|
13 |
|
14 |
-
gr.
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
print(result)
|
12 |
return result
|
13 |
|
14 |
+
with gr.Blocks() as demo:
|
15 |
+
with gr.Row():
|
16 |
+
with gr.Column():
|
17 |
+
image_in = gr.Image(sources=["upload"], type="filepath")
|
18 |
+
question = gr.Textbox()
|
19 |
+
submit_btn = gr.Button("Submit")
|
20 |
+
with gr.Column():
|
21 |
+
answer = gr.Textbox()
|
22 |
+
|
23 |
+
submit_btn.click(
|
24 |
+
fn=infer,
|
25 |
+
inputs=[image_in, question],
|
26 |
+
outputs=[answer]
|
27 |
+
)
|
28 |
+
|
29 |
+
demo.launch()
|