Spaces:
Sleeping
Sleeping
Change order of information (model id last)
Browse files
app.py
CHANGED
|
@@ -65,11 +65,7 @@ def process_ocr_qa(text, lang_choice):
|
|
| 65 |
# Diagnostics section
|
| 66 |
if 'diagnostics' in result and result['diagnostics']:
|
| 67 |
diagnostics = result['diagnostics']
|
| 68 |
-
|
| 69 |
-
# Model information
|
| 70 |
-
if 'model_id' in diagnostics:
|
| 71 |
-
output_lines.append(f"π€ Model: {diagnostics['model_id']}")
|
| 72 |
-
|
| 73 |
# Known tokens
|
| 74 |
if 'known_tokens' in diagnostics and diagnostics['known_tokens']:
|
| 75 |
known_tokens = diagnostics['known_tokens']
|
|
@@ -81,7 +77,11 @@ def process_ocr_qa(text, lang_choice):
|
|
| 81 |
output_lines.append(f"β Unrecognized unique tokens ({u}):\n{' '.join(unknown_tokens)}")
|
| 82 |
elif 'unknown_tokens' in diagnostics:
|
| 83 |
output_lines.append("β¨ All tokens were known β no OCR errors detected.")
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
# Other fields
|
| 86 |
for key, value in result.items():
|
| 87 |
if key not in ['language', 'score', 'diagnostics']:
|
|
|
|
| 65 |
# Diagnostics section
|
| 66 |
if 'diagnostics' in result and result['diagnostics']:
|
| 67 |
diagnostics = result['diagnostics']
|
| 68 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
# Known tokens
|
| 70 |
if 'known_tokens' in diagnostics and diagnostics['known_tokens']:
|
| 71 |
known_tokens = diagnostics['known_tokens']
|
|
|
|
| 77 |
output_lines.append(f"β Unrecognized unique tokens ({u}):\n{' '.join(unknown_tokens)}")
|
| 78 |
elif 'unknown_tokens' in diagnostics:
|
| 79 |
output_lines.append("β¨ All tokens were known β no OCR errors detected.")
|
| 80 |
+
|
| 81 |
+
# Model information
|
| 82 |
+
if 'model_id' in diagnostics:
|
| 83 |
+
output_lines.append(f"π€ Model: {diagnostics['model_id']}")
|
| 84 |
+
|
| 85 |
# Other fields
|
| 86 |
for key, value in result.items():
|
| 87 |
if key not in ['language', 'score', 'diagnostics']:
|