Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,7 +115,7 @@ def extract_invoice_data(file_data, content_type, json_schema):
|
|
| 115 |
img_byte_arr = io.BytesIO()
|
| 116 |
img.save(img_byte_arr, format="PNG", dpi=(300, 300))
|
| 117 |
base64_encoded = base64.b64encode(img_byte_arr.getvalue()).decode('utf-8')
|
| 118 |
-
base64_images.append(f"data:
|
| 119 |
|
| 120 |
# Store all images as a single JSON object
|
| 121 |
base64DataResp = json.dumps(base64_images)
|
|
|
|
| 115 |
img_byte_arr = io.BytesIO()
|
| 116 |
img.save(img_byte_arr, format="PNG", dpi=(300, 300))
|
| 117 |
base64_encoded = base64.b64encode(img_byte_arr.getvalue()).decode('utf-8')
|
| 118 |
+
base64_images.append(f"data:image/png;base64,{base64_encoded}")
|
| 119 |
|
| 120 |
# Store all images as a single JSON object
|
| 121 |
base64DataResp = json.dumps(base64_images)
|