Spaces:
Running on Zero
Running on Zero
wjm55 commited on
Commit ·
f07ac74
1
Parent(s): d5836e4
Update run_example function to return result twice for improved display and state management
Browse files
app.py
CHANGED
|
@@ -153,7 +153,7 @@ def run_example(image, model_id="Qwen/Qwen2-VL-7B-Instruct", run_ner=False, ner_
|
|
| 153 |
|
| 154 |
# If NER is disabled, return the text without highlighting
|
| 155 |
result = TextWithMetadata([(ocr_text, None)], original_text=ocr_text, entities=[])
|
| 156 |
-
return result
|
| 157 |
|
| 158 |
css = """
|
| 159 |
/* Overall app styling */
|
|
|
|
| 153 |
|
| 154 |
# If NER is disabled, return the text without highlighting
|
| 155 |
result = TextWithMetadata([(ocr_text, None)], original_text=ocr_text, entities=[])
|
| 156 |
+
return result, result # Return twice: once for display, once for state
|
| 157 |
|
| 158 |
css = """
|
| 159 |
/* Overall app styling */
|