File size: 646 Bytes
ee58802
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr


# Define the Gradio interface
with gr.Blocks() as demo:
    gr.Markdown("# Sanjog Test Image and Question Answering\nProvide an image (JPG/PNG) and a related question to get an answer.")

    with gr.Row():
        with gr.Column():
            image_input = gr.Image(type="pil", label="Upload Image (JPG/PNG)")
            question_input = gr.Textbox(label="Enter your question")

        with gr.Column():
            output_box = gr.Textbox(label="Result", interactive=False)

    with gr.Row():
        clear_button = gr.Button("Clear")
        submit_button = gr.Button("Submit")



# Launch the interface
demo.launch()