|
|
import gradio as gr |
|
|
|
|
|
|
|
|
def process_image_stream(question): |
|
|
return "This is a test response" |
|
|
|
|
|
|
|
|
demo = gr.Blocks(theme="soft") |
|
|
|
|
|
with demo: |
|
|
with gr.Column(): |
|
|
gr.Markdown("# Nexa Omni Vision") |
|
|
|
|
|
question = gr.Textbox( |
|
|
label="Question", |
|
|
placeholder="Ask a question about the image...", |
|
|
value="Describe this image", |
|
|
elem_classes="input-box" |
|
|
) |
|
|
|
|
|
response = gr.Textbox( |
|
|
label="Response", |
|
|
interactive=False, |
|
|
elem_classes="output-box" |
|
|
) |
|
|
|
|
|
question.submit(fn=process_image_stream, inputs=question, outputs=response) |
|
|
|
|
|
if __name__ == "__main__": |
|
|
demo.queue().launch(server_name="0.0.0.0", server_port=7860) |