Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -390,6 +390,7 @@ async def process_photo(image_id: str = Form(...), user_id: str = Form(...)):
|
|
| 390 |
return {"error": "An error occurred while processing the image"}
|
| 391 |
|
| 392 |
data = json.loads(dataJson)
|
|
|
|
| 393 |
logging.info(f"user_data: {user_data}")
|
| 394 |
# Check if 'receipts' key exists and the length
|
| 395 |
found_receipt_no = len(data['receipts']) if 'receipts' in data else 0
|
|
|
|
| 390 |
return {"error": "An error occurred while processing the image"}
|
| 391 |
|
| 392 |
data = json.loads(dataJson)
|
| 393 |
+
data = [str(element) for element in data]
|
| 394 |
logging.info(f"user_data: {user_data}")
|
| 395 |
# Check if 'receipts' key exists and the length
|
| 396 |
found_receipt_no = len(data['receipts']) if 'receipts' in data else 0
|