Spaces:
Sleeping
Sleeping
Claude commited on
Commit Β·
eeaf6d4
1
Parent(s): fe5b004
fix: move scope->OCR wiring after ocr_page_selection defined (UnboundLocalError)
Browse files- smoke_signal_tab.py +6 -7
smoke_signal_tab.py
CHANGED
|
@@ -2753,13 +2753,6 @@ def smoke_signal_tab():
|
|
| 2753 |
inputs=[scope_book_id, scope_include, scope_exclude, scope_title],
|
| 2754 |
outputs=[ingest_status, manifest_table, ingest_log],
|
| 2755 |
)
|
| 2756 |
-
# Push saved scope values live to OCR page selection fields
|
| 2757 |
-
scope_save_btn.click(
|
| 2758 |
-
lambda inc, exc: (inc or "", exc or ""),
|
| 2759 |
-
inputs=[scope_include, scope_exclude],
|
| 2760 |
-
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2761 |
-
)
|
| 2762 |
-
|
| 2763 |
# ββ Auto-populate: book code + year β both book ID fields ββββββ
|
| 2764 |
def _make_book_id(code, year):
|
| 2765 |
code = (code or "").strip().lower()[:3]
|
|
@@ -2879,6 +2872,12 @@ def smoke_signal_tab():
|
|
| 2879 |
_default_ocr_scope_values,
|
| 2880 |
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2881 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2882 |
|
| 2883 |
# ββ STEP 4: REVIEW ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2884 |
with gr.TabItem("β£ Review", id="ss-review") as review_tab:
|
|
|
|
| 2753 |
inputs=[scope_book_id, scope_include, scope_exclude, scope_title],
|
| 2754 |
outputs=[ingest_status, manifest_table, ingest_log],
|
| 2755 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2756 |
# ββ Auto-populate: book code + year β both book ID fields ββββββ
|
| 2757 |
def _make_book_id(code, year):
|
| 2758 |
code = (code or "").strip().lower()[:3]
|
|
|
|
| 2872 |
_default_ocr_scope_values,
|
| 2873 |
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2874 |
)
|
| 2875 |
+
# Push saved scope values live to OCR page selection when user saves on ingest
|
| 2876 |
+
scope_save_btn.click(
|
| 2877 |
+
lambda inc, exc: (inc or "", exc or ""),
|
| 2878 |
+
inputs=[scope_include, scope_exclude],
|
| 2879 |
+
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2880 |
+
)
|
| 2881 |
|
| 2882 |
# ββ STEP 4: REVIEW ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2883 |
with gr.TabItem("β£ Review", id="ss-review") as review_tab:
|