Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,12 +31,19 @@ def _payload(q: str):
|
|
| 31 |
if data[0]=="Text":
|
| 32 |
content=data[1]
|
| 33 |
else:
|
| 34 |
-
content
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
}
|
| 39 |
-
|
| 40 |
info=config.config
|
| 41 |
system=info[0][data[3]]
|
| 42 |
|
|
|
|
| 31 |
if data[0]=="Text":
|
| 32 |
content=data[1]
|
| 33 |
else:
|
| 34 |
+
# For images, content must be an array with text + image
|
| 35 |
+
content=[
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Analyze and explain this image in detail"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"type": "image_url",
|
| 42 |
+
"image_url": {
|
| 43 |
+
"url": data[1]
|
| 44 |
+
}
|
| 45 |
}
|
| 46 |
+
]
|
| 47 |
info=config.config
|
| 48 |
system=info[0][data[3]]
|
| 49 |
|