Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ def analyze_image(image, prompt, model_name):
|
|
| 76 |
return f"Error: {str(e)}"
|
| 77 |
|
| 78 |
# Create the Gradio interface
|
| 79 |
-
with gr.Blocks(title="OpenRouter AI Vision Interface", css="style.css"
|
| 80 |
gr.Markdown(
|
| 81 |
"""
|
| 82 |
# 🔍 OpenRouter AI Vision Interface
|
|
@@ -90,8 +90,8 @@ with gr.Blocks(title="OpenRouter AI Vision Interface", css="style.css", theme=gr
|
|
| 90 |
with gr.Row():
|
| 91 |
with gr.Column():
|
| 92 |
# Input components with custom styling
|
| 93 |
-
with gr.
|
| 94 |
-
image_input = gr.Image(type="pil", label="Upload Image"
|
| 95 |
prompt_input = gr.Textbox(label="Your Question", placeholder="What is in this image?", value="What is in this image?")
|
| 96 |
model_dropdown = gr.Dropdown(
|
| 97 |
choices=list(MODELS.keys()),
|
|
@@ -103,7 +103,7 @@ with gr.Blocks(title="OpenRouter AI Vision Interface", css="style.css", theme=gr
|
|
| 103 |
|
| 104 |
with gr.Column():
|
| 105 |
# Output component with custom styling
|
| 106 |
-
with gr.
|
| 107 |
output_text = gr.Textbox(label="AI Response", lines=12)
|
| 108 |
|
| 109 |
gr.Markdown(
|
|
|
|
| 76 |
return f"Error: {str(e)}"
|
| 77 |
|
| 78 |
# Create the Gradio interface
|
| 79 |
+
with gr.Blocks(title="OpenRouter AI Vision Interface", css="style.css") as demo:
|
| 80 |
gr.Markdown(
|
| 81 |
"""
|
| 82 |
# 🔍 OpenRouter AI Vision Interface
|
|
|
|
| 90 |
with gr.Row():
|
| 91 |
with gr.Column():
|
| 92 |
# Input components with custom styling
|
| 93 |
+
with gr.Group():
|
| 94 |
+
image_input = gr.Image(type="pil", label="Upload Image")
|
| 95 |
prompt_input = gr.Textbox(label="Your Question", placeholder="What is in this image?", value="What is in this image?")
|
| 96 |
model_dropdown = gr.Dropdown(
|
| 97 |
choices=list(MODELS.keys()),
|
|
|
|
| 103 |
|
| 104 |
with gr.Column():
|
| 105 |
# Output component with custom styling
|
| 106 |
+
with gr.Group():
|
| 107 |
output_text = gr.Textbox(label="AI Response", lines=12)
|
| 108 |
|
| 109 |
gr.Markdown(
|