Spaces:
Sleeping
Sleeping
Pointf5ive commited on
Commit Β·
5b9892b
1
Parent(s): c32b0f6
Hide floating OCR progress overlay
Browse files- smoke_signal_tab.py +10 -2
smoke_signal_tab.py
CHANGED
|
@@ -1748,7 +1748,11 @@ def smoke_signal_tab():
|
|
| 1748 |
ocr_btn = gr.Button("Run OCR β", elem_classes=["ss-btn-run"])
|
| 1749 |
ocr_log = gr.Textbox(label="Log", lines=10, interactive=False, elem_classes=["ss-log"])
|
| 1750 |
|
| 1751 |
-
ocr_run_event = ocr_btn.click(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1752 |
|
| 1753 |
# ββ STEP 4: REVIEW ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1754 |
with gr.TabItem("β£ Review", id="ss-review") as review_tab:
|
|
@@ -1843,7 +1847,11 @@ def smoke_signal_tab():
|
|
| 1843 |
outputs=review_load_outputs
|
| 1844 |
)
|
| 1845 |
review_tab.select(load_review, outputs=review_load_outputs)
|
| 1846 |
-
ocr_run_event.then(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1847 |
accept_btn.click(do_accept, inputs=[current_idx, final_text_box, reviewer_name, reason_code], outputs=action_outputs)
|
| 1848 |
edit_btn.click(do_accept, inputs=[current_idx, final_text_box, reviewer_name, reason_code], outputs=action_outputs)
|
| 1849 |
reject_btn.click(do_reject, inputs=[current_idx, final_text_box, reviewer_name, reason_code], outputs=action_outputs)
|
|
|
|
| 1748 |
ocr_btn = gr.Button("Run OCR β", elem_classes=["ss-btn-run"])
|
| 1749 |
ocr_log = gr.Textbox(label="Log", lines=10, interactive=False, elem_classes=["ss-log"])
|
| 1750 |
|
| 1751 |
+
ocr_run_event = ocr_btn.click(
|
| 1752 |
+
run_ocr,
|
| 1753 |
+
outputs=[ocr_status, ocr_log],
|
| 1754 |
+
show_progress="hidden",
|
| 1755 |
+
)
|
| 1756 |
|
| 1757 |
# ββ STEP 4: REVIEW ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1758 |
with gr.TabItem("β£ Review", id="ss-review") as review_tab:
|
|
|
|
| 1847 |
outputs=review_load_outputs
|
| 1848 |
)
|
| 1849 |
review_tab.select(load_review, outputs=review_load_outputs)
|
| 1850 |
+
ocr_run_event.then(
|
| 1851 |
+
load_review,
|
| 1852 |
+
outputs=review_load_outputs,
|
| 1853 |
+
show_progress="hidden",
|
| 1854 |
+
)
|
| 1855 |
accept_btn.click(do_accept, inputs=[current_idx, final_text_box, reviewer_name, reason_code], outputs=action_outputs)
|
| 1856 |
edit_btn.click(do_accept, inputs=[current_idx, final_text_box, reviewer_name, reason_code], outputs=action_outputs)
|
| 1857 |
reject_btn.click(do_reject, inputs=[current_idx, final_text_box, reviewer_name, reason_code], outputs=action_outputs)
|