Spaces:
Running
Running
Updated space.
Browse files
app.py
CHANGED
@@ -412,7 +412,7 @@ def handleMultimodalData(model, role, data):
|
|
412 |
encoded_image = base64.b64encode(image_file.read()).decode('utf-8')
|
413 |
result.append({"type": "image_url", "image_url": {"url": "data:" + file['mime_type'] + ";base64," + encoded_image}})
|
414 |
else:
|
415 |
-
result.append({"type": "image_url", "image_url": {"url": GRADIO_URL_PATH + "file=" + requests.utils.quote(file['path'])}})
|
416 |
if file['mime_type'].startswith("text/") or file['mime_type'].startswith("application/"):
|
417 |
hasFoundFile = True
|
418 |
try:
|
|
|
412 |
encoded_image = base64.b64encode(image_file.read()).decode('utf-8')
|
413 |
result.append({"type": "image_url", "image_url": {"url": "data:" + file['mime_type'] + ";base64," + encoded_image}})
|
414 |
else:
|
415 |
+
result.append({"type": "image_url", "image_url": {"url": GRADIO_URL_PATH + "file=" + requests.utils.quote(str(file['path']))}})
|
416 |
if file['mime_type'].startswith("text/") or file['mime_type'].startswith("application/"):
|
417 |
hasFoundFile = True
|
418 |
try:
|