SG_TestSpace / app.py
OP7's picture
Update app.py
ee58802 verified
raw
history blame
646 Bytes
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()