Add application file
Browse files
app.py
CHANGED
@@ -24,9 +24,9 @@ def analyze_image_direct(image, question):
|
|
24 |
return answer
|
25 |
# Create a Gradio interface
|
26 |
with gr.Blocks() as block:
|
27 |
-
image = gr.
|
28 |
-
question = gr.
|
29 |
-
output = gr.
|
30 |
-
gr.Interface(fn=analyze_image_direct, inputs=[image, question], outputs=output)
|
31 |
|
32 |
-
block.launch()
|
|
|
24 |
return answer
|
25 |
# Create a Gradio interface
|
26 |
with gr.Blocks() as block:
|
27 |
+
image = gr.Image(label="Image")
|
28 |
+
question = gr.Textbox(label="Question")
|
29 |
+
output = gr.Textbox(label="Answer")
|
30 |
+
block.add(gr.Interface(fn=analyze_image_direct, inputs=[image, question], outputs=output))
|
31 |
|
32 |
+
block.launch()
|