OP7 commited on
Commit
ee58802
·
verified ·
1 Parent(s): 6cd29da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -7
app.py CHANGED
@@ -1,7 +1,23 @@
1
- import gradio as gr
2
-
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()