Spaces:
Sleeping
Sleeping
Claude commited on
Commit Β·
51754bb
1
Parent(s): 9021659
fix: scope->OCR wiring after ocr_page_selection defined, no more UnboundLocalError
Browse files- smoke_signal_tab.py +8 -0
smoke_signal_tab.py
CHANGED
|
@@ -2880,6 +2880,14 @@ def smoke_signal_tab():
|
|
| 2880 |
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2881 |
)
|
| 2882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2883 |
|
| 2884 |
# ββ STEP 4: REVIEW ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2885 |
with gr.TabItem("β£ Review", id="ss-review") as review_tab:
|
|
|
|
| 2880 |
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2881 |
)
|
| 2882 |
|
| 2883 |
+
# Wire scope_save_btn to also push story pages to OCR fields
|
| 2884 |
+
# Must be here β after ocr_page_selection is defined
|
| 2885 |
+
scope_save_btn.click(
|
| 2886 |
+
lambda inc, exc: ((inc or "").strip(), (exc or "").strip()),
|
| 2887 |
+
inputs=[scope_include, scope_exclude],
|
| 2888 |
+
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2889 |
+
)
|
| 2890 |
+
|
| 2891 |
|
| 2892 |
# ββ STEP 4: REVIEW ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2893 |
with gr.TabItem("β£ Review", id="ss-review") as review_tab:
|