Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,11 +125,13 @@ def run_structure_analysis(ocr_input: OcrInput):
|
|
| 125 |
print ("** Request for structure analysis received. Running structure_engine.**")
|
| 126 |
# Use the structure_engine here
|
| 127 |
raw_result = structure_engine.predict(img)
|
|
|
|
| 128 |
|
| 129 |
print ("** We have got the result back. Now converting to JSON **")
|
| 130 |
|
| 131 |
# --- CRITICAL STEP: Clean the result before returning ---
|
| 132 |
json_safe_result = clean_ppstructure_result(raw_result)
|
|
|
|
| 133 |
# --------------------------------------------------------
|
| 134 |
|
| 135 |
print ("** Structure Analysis Complete. Returning the JSON result.**")
|
|
|
|
| 125 |
print ("** Request for structure analysis received. Running structure_engine.**")
|
| 126 |
# Use the structure_engine here
|
| 127 |
raw_result = structure_engine.predict(img)
|
| 128 |
+
print (raw_result)
|
| 129 |
|
| 130 |
print ("** We have got the result back. Now converting to JSON **")
|
| 131 |
|
| 132 |
# --- CRITICAL STEP: Clean the result before returning ---
|
| 133 |
json_safe_result = clean_ppstructure_result(raw_result)
|
| 134 |
+
print (json_safe_result)
|
| 135 |
# --------------------------------------------------------
|
| 136 |
|
| 137 |
print ("** Structure Analysis Complete. Returning the JSON result.**")
|