Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def chat_with_image(message, image, history):
|
|
| 30 |
if encoded_image:
|
| 31 |
messages.append({
|
| 32 |
"role": "user",
|
| 33 |
-
"content": f"[IMAGE]{encoded_image}[/IMAGE]\nWhat
|
| 34 |
})
|
| 35 |
else:
|
| 36 |
messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
|
|
@@ -45,7 +45,7 @@ def chat_with_image(message, image, history):
|
|
| 45 |
if encoded_image:
|
| 46 |
messages.append({
|
| 47 |
"role": "user",
|
| 48 |
-
"content": f"[IMAGE]{encoded_image}[/IMAGE]\n{message or
|
| 49 |
})
|
| 50 |
else:
|
| 51 |
messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
|
|
|
|
| 30 |
if encoded_image:
|
| 31 |
messages.append({
|
| 32 |
"role": "user",
|
| 33 |
+
"content": f"[IMAGE]{encoded_image}[/IMAGE]\nWhat is in this image?"
|
| 34 |
})
|
| 35 |
else:
|
| 36 |
messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
|
|
|
|
| 45 |
if encoded_image:
|
| 46 |
messages.append({
|
| 47 |
"role": "user",
|
| 48 |
+
"content": f"[IMAGE]{encoded_image}[/IMAGE]\n{message or 'What is in this image?'}"
|
| 49 |
})
|
| 50 |
else:
|
| 51 |
messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
|