Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,23 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
# Define the Gradio interface
|
| 5 |
+
with gr.Blocks() as demo:
|
| 6 |
+
gr.Markdown("# Sanjog Test Image and Question Answering\nProvide an image (JPG/PNG) and a related question to get an answer.")
|
| 7 |
+
|
| 8 |
+
with gr.Row():
|
| 9 |
+
with gr.Column():
|
| 10 |
+
image_input = gr.Image(type="pil", label="Upload Image (JPG/PNG)")
|
| 11 |
+
question_input = gr.Textbox(label="Enter your question")
|
| 12 |
+
|
| 13 |
+
with gr.Column():
|
| 14 |
+
output_box = gr.Textbox(label="Result", interactive=False)
|
| 15 |
+
|
| 16 |
+
with gr.Row():
|
| 17 |
+
clear_button = gr.Button("Clear")
|
| 18 |
+
submit_button = gr.Button("Submit")
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# Launch the interface
|
| 23 |
+
demo.launch()
|