Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,7 +123,7 @@ def extract_invoice_data(file_data, content_type, json_schema):
|
|
| 123 |
# Handle direct image files
|
| 124 |
base64_encoded = base64.b64encode(file_data).decode('utf-8')
|
| 125 |
base64_images.append(f"data:{content_type.lower()};base64,{base64_encoded}")
|
| 126 |
-
base64dataresp = f"data:{content_type.lower()};base64,{base64_encoded}
|
| 127 |
|
| 128 |
# Prepare OpenAI request
|
| 129 |
openai_content = [{"type": "image_url", "image_url": {"url": img_base64}} for img_base64 in base64_images]
|
|
|
|
| 123 |
# Handle direct image files
|
| 124 |
base64_encoded = base64.b64encode(file_data).decode('utf-8')
|
| 125 |
base64_images.append(f"data:{content_type.lower()};base64,{base64_encoded}")
|
| 126 |
+
base64dataresp = f"data:{content_type.lower()};base64,{base64_encoded}"
|
| 127 |
|
| 128 |
# Prepare OpenAI request
|
| 129 |
openai_content = [{"type": "image_url", "image_url": {"url": img_base64}} for img_base64 in base64_images]
|