Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -144,17 +144,13 @@ def _launch_demo(args):
|
|
| 144 |
"url": f"data:image/jpeg;base64,{encode_image(q[0])}"
|
| 145 |
}
|
| 146 |
})
|
| 147 |
-
|
| 148 |
content.append({"type": "text", 'text': q})
|
| 149 |
messages.append({'role': 'user', 'content': content})
|
| 150 |
-
if a:
|
| 151 |
-
messages.append({'role': 'assistant', 'content': [{"type": "text", 'text': a}]})
|
| 152 |
-
content = []
|
| 153 |
-
else:
|
| 154 |
-
continue
|
| 155 |
-
|
| 156 |
-
|
| 157 |
|
|
|
|
|
|
|
|
|
|
| 158 |
messages.pop()
|
| 159 |
responses = client.chat.completions.create(
|
| 160 |
model="Qwen2_5VL",
|
|
|
|
| 144 |
"url": f"data:image/jpeg;base64,{encode_image(q[0])}"
|
| 145 |
}
|
| 146 |
})
|
| 147 |
+
else:
|
| 148 |
content.append({"type": "text", 'text': q})
|
| 149 |
messages.append({'role': 'user', 'content': content})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
+
messages.append({'role': 'assistant', 'content': [{"type": "text", 'text': a}]})
|
| 152 |
+
content = []
|
| 153 |
+
|
| 154 |
messages.pop()
|
| 155 |
responses = client.chat.completions.create(
|
| 156 |
model="Qwen2_5VL",
|