Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -37,9 +37,9 @@ def url_to_base64(image_url):
|
|
37 |
if response.status_code == 200:
|
38 |
# Encode image content to Base64
|
39 |
base64_image = base64.b64encode(response.content).decode('utf-8')
|
40 |
-
return base64_image
|
41 |
else:
|
42 |
-
return
|
43 |
|
44 |
import json
|
45 |
|
|
|
37 |
if response.status_code == 200:
|
38 |
# Encode image content to Base64
|
39 |
base64_image = base64.b64encode(response.content).decode('utf-8')
|
40 |
+
return f"data:image/jpeg;base64,{base64_image}"
|
41 |
else:
|
42 |
+
return f"data:image/jpeg;base64,"
|
43 |
|
44 |
import json
|
45 |
|