Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -214,15 +214,15 @@ with gr.Blocks(title="OpenRouter AI Multi-Modal Interface", css="style.css") as
|
|
| 214 |
def update_model_choices(model_type):
|
| 215 |
if model_type == "Text Models":
|
| 216 |
return {
|
| 217 |
-
model_dropdown: gr.
|
| 218 |
-
image_input: gr.
|
| 219 |
-
image_instructions: gr.
|
| 220 |
}
|
| 221 |
else: # Image Models
|
| 222 |
return {
|
| 223 |
-
model_dropdown: gr.
|
| 224 |
-
image_input: gr.
|
| 225 |
-
image_instructions: gr.
|
| 226 |
}
|
| 227 |
|
| 228 |
model_dropdown = gr.Dropdown(
|
|
|
|
| 214 |
def update_model_choices(model_type):
|
| 215 |
if model_type == "Text Models":
|
| 216 |
return {
|
| 217 |
+
model_dropdown: gr.update(choices=list(TEXT_MODELS.keys()), value="Mistral Small"),
|
| 218 |
+
image_input: gr.update(visible=False),
|
| 219 |
+
image_instructions: gr.update(visible=False)
|
| 220 |
}
|
| 221 |
else: # Image Models
|
| 222 |
return {
|
| 223 |
+
model_dropdown: gr.update(choices=list(IMAGE_MODELS.keys()), value="Kimi Vision"),
|
| 224 |
+
image_input: gr.update(visible=True),
|
| 225 |
+
image_instructions: gr.update(visible=True)
|
| 226 |
}
|
| 227 |
|
| 228 |
model_dropdown = gr.Dropdown(
|