Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,7 +100,7 @@ def user(user_message, image_data, history: list):
|
|
| 100 |
"role": "user",
|
| 101 |
"content": [
|
| 102 |
{"type": "text", "text": stripped_message},
|
| 103 |
-
{"type": "image", "path": tmp_path
|
| 104 |
]
|
| 105 |
})
|
| 106 |
has_content = True
|
|
@@ -110,7 +110,7 @@ def user(user_message, image_data, history: list):
|
|
| 110 |
elif tmp_path is not None:
|
| 111 |
updated_history.append({
|
| 112 |
"role": "user",
|
| 113 |
-
"content": [{"type": "image", "path": tmp_path
|
| 114 |
})
|
| 115 |
has_content = True
|
| 116 |
|
|
|
|
| 100 |
"role": "user",
|
| 101 |
"content": [
|
| 102 |
{"type": "text", "text": stripped_message},
|
| 103 |
+
{"type": "image", "path": tmp_path, "alt_text": "uploaded image", "_pil_image": image_obj}
|
| 104 |
]
|
| 105 |
})
|
| 106 |
has_content = True
|
|
|
|
| 110 |
elif tmp_path is not None:
|
| 111 |
updated_history.append({
|
| 112 |
"role": "user",
|
| 113 |
+
"content": [{"type": "image", "path": tmp_path, "alt_text": "uploaded image", "_pil_image": image_obj}]
|
| 114 |
})
|
| 115 |
has_content = True
|
| 116 |
|