Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def blob_to_base64_html(blob_data):
|
|
| 22 |
try:
|
| 23 |
if isinstance(blob_data, (bytes, bytearray)):
|
| 24 |
encoded = base64.b64encode(blob_data).decode('utf-8')
|
| 25 |
-
|
| 26 |
style="
|
| 27 |
width:100%;
|
| 28 |
max-width:1000px;
|
|
@@ -32,8 +32,7 @@ def blob_to_base64_html(blob_data):
|
|
| 32 |
cursor: zoom-in;
|
| 33 |
"
|
| 34 |
onclick="window.open(this.src)"
|
| 35 |
-
>
|
| 36 |
-
"""
|
| 37 |
return str(blob_data)
|
| 38 |
except Exception:
|
| 39 |
return str(blob_data)
|
|
|
|
| 22 |
try:
|
| 23 |
if isinstance(blob_data, (bytes, bytearray)):
|
| 24 |
encoded = base64.b64encode(blob_data).decode('utf-8')
|
| 25 |
+
return f"""<img src="data:image/png;base64,{encoded}"
|
| 26 |
style="
|
| 27 |
width:100%;
|
| 28 |
max-width:1000px;
|
|
|
|
| 32 |
cursor: zoom-in;
|
| 33 |
"
|
| 34 |
onclick="window.open(this.src)"
|
| 35 |
+
>"""
|
|
|
|
| 36 |
return str(blob_data)
|
| 37 |
except Exception:
|
| 38 |
return str(blob_data)
|