Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,12 +29,12 @@ def generate_caption(encoded_image):
|
|
29 |
{
|
30 |
"role": "user",
|
31 |
"content": "Write a caption for this image"
|
32 |
-
},
|
33 |
-
{
|
34 |
-
"role": "user",
|
35 |
-
"content": f"data:image/png;base64,{encoded_image}" # This is where the image is passed as base64 directly
|
36 |
}
|
37 |
],
|
|
|
|
|
|
|
|
|
38 |
"temperature": 0
|
39 |
}
|
40 |
|
|
|
29 |
{
|
30 |
"role": "user",
|
31 |
"content": "Write a caption for this image"
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
],
|
34 |
+
"image": {
|
35 |
+
"type": "image_url",
|
36 |
+
"image_url": f"data:image/png;base64,{encoded_image}"
|
37 |
+
},
|
38 |
"temperature": 0
|
39 |
}
|
40 |
|