Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -161,7 +161,7 @@ def process_receipt_endpoint():
|
|
| 161 |
compressed_buffer = io.BytesIO()
|
| 162 |
image.save(compressed_buffer, format="JPEG", optimize=True, quality=90) # Adjust quality as needed
|
| 163 |
compressed_image_bytes = compressed_buffer.getvalue()
|
| 164 |
-
compressed_image = Image.open(io.BytesIO(compressed_image_bytes)
|
| 165 |
model = configure_gemini()
|
| 166 |
result_text = process_receipt(model, compressed_image)
|
| 167 |
|
|
|
|
| 161 |
compressed_buffer = io.BytesIO()
|
| 162 |
image.save(compressed_buffer, format="JPEG", optimize=True, quality=90) # Adjust quality as needed
|
| 163 |
compressed_image_bytes = compressed_buffer.getvalue()
|
| 164 |
+
compressed_image = Image.open(io.BytesIO(compressed_image_bytes))
|
| 165 |
model = configure_gemini()
|
| 166 |
result_text = process_receipt(model, compressed_image)
|
| 167 |
|