Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -412,8 +412,9 @@ Output JSON:
|
|
| 412 |
|
| 413 |
structured_data_cache[text_hash] = structured_data
|
| 414 |
logger.info(f"Gemini processing for {filename}, took {time.time() - start_time:.2f} seconds, {log_memory_usage()}")
|
| 415 |
-
#
|
| 416 |
-
|
|
|
|
| 417 |
return structured_data
|
| 418 |
except Exception as e:
|
| 419 |
logger.error(f"Gemini processing failed for {filename}: {str(e)}, {log_memory_usage()}")
|
|
|
|
| 412 |
|
| 413 |
structured_data_cache[text_hash] = structured_data
|
| 414 |
logger.info(f"Gemini processing for {filename}, took {time.time() - start_time:.2f} seconds, {log_memory_usage()}")
|
| 415 |
+
# Log the final converted data with proper string representation
|
| 416 |
+
log_friendly_data = custom_encoder(structured_data)
|
| 417 |
+
logger.info(f"Final Structured Data (JSON format): {log_friendly_data}")
|
| 418 |
return structured_data
|
| 419 |
except Exception as e:
|
| 420 |
logger.error(f"Gemini processing failed for {filename}: {str(e)}, {log_memory_usage()}")
|