Spaces:
Build error
Build error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -6,9 +6,10 @@ import io
|
|
| 6 |
|
| 7 |
|
| 8 |
def answer(input_img, selected):
|
| 9 |
-
|
| 10 |
buffer = io.BytesIO()
|
| 11 |
-
|
|
|
|
| 12 |
image_data = base64.b64encode(buffer.getvalue()).decode('utf-8')
|
| 13 |
|
| 14 |
if selected == "Describe things":
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
def answer(input_img, selected):
|
| 9 |
+
|
| 10 |
buffer = io.BytesIO()
|
| 11 |
+
|
| 12 |
+
input_img.save(buffer, format="PNG")
|
| 13 |
image_data = base64.b64encode(buffer.getvalue()).decode('utf-8')
|
| 14 |
|
| 15 |
if selected == "Describe things":
|