Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -231,6 +231,7 @@ def extract_invoice_data(file_data, content_type):
|
|
| 231 |
|
| 232 |
# Clean and parse JSON output
|
| 233 |
content = response.choices[0].message.content.strip()
|
|
|
|
| 234 |
|
| 235 |
try:
|
| 236 |
parsed_content = json.loads(cleaned_content)
|
|
|
|
| 231 |
|
| 232 |
# Clean and parse JSON output
|
| 233 |
content = response.choices[0].message.content.strip()
|
| 234 |
+
return json.loads(content)
|
| 235 |
|
| 236 |
try:
|
| 237 |
parsed_content = json.loads(cleaned_content)
|