Spaces:
Running
Running
add glm 4
Browse files
app.py
CHANGED
|
@@ -106,6 +106,11 @@ AVAILABLE_MODELS = [
|
|
| 106 |
"name": "SmolLM3-3B",
|
| 107 |
"id": "HuggingFaceTB/SmolLM3-3B",
|
| 108 |
"description": "SmolLM3-3B model for code generation and general tasks"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
}
|
| 110 |
]
|
| 111 |
|
|
@@ -257,7 +262,8 @@ def clear_history():
|
|
| 257 |
def update_image_input_visibility(model):
|
| 258 |
"""Update image input visibility based on selected model"""
|
| 259 |
is_ernie_vl = model.get("id") == "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT"
|
| 260 |
-
|
|
|
|
| 261 |
|
| 262 |
def process_image_for_model(image):
|
| 263 |
"""Convert image to base64 for model input"""
|
|
|
|
| 106 |
"name": "SmolLM3-3B",
|
| 107 |
"id": "HuggingFaceTB/SmolLM3-3B",
|
| 108 |
"description": "SmolLM3-3B model for code generation and general tasks"
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"name": "GLM-4.1V-9B-Thinking",
|
| 112 |
+
"id": "THUDM/GLM-4.1V-9B-Thinking",
|
| 113 |
+
"description": "GLM-4.1V-9B-Thinking model for multimodal code generation with image support"
|
| 114 |
}
|
| 115 |
]
|
| 116 |
|
|
|
|
| 262 |
def update_image_input_visibility(model):
|
| 263 |
"""Update image input visibility based on selected model"""
|
| 264 |
is_ernie_vl = model.get("id") == "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT"
|
| 265 |
+
is_glm_vl = model.get("id") == "THUDM/GLM-4.1V-9B-Thinking"
|
| 266 |
+
return gr.update(visible=is_ernie_vl or is_glm_vl)
|
| 267 |
|
| 268 |
def process_image_for_model(image):
|
| 269 |
"""Convert image to base64 for model input"""
|