Spaces:
Sleeping
Sleeping
Claude commited on
Commit Β·
a7ef977
1
Parent(s): 51754bb
fix: remove stale _save_scope_and_push_ocr causing UnboundLocalError
Browse files- smoke_signal_tab.py +0 -11
smoke_signal_tab.py
CHANGED
|
@@ -2748,18 +2748,7 @@ def smoke_signal_tab():
|
|
| 2748 |
scope_exclude = gr.Textbox(label="Story Pages Exclude", placeholder="e.g. 1,2,3,17,25", scale=1)
|
| 2749 |
scope_title = gr.Textbox(label="Safe Book Title", placeholder="e.g. the-gruffalo", scale=1)
|
| 2750 |
scope_save_btn = gr.Button("Save Book Pages β", size="sm")
|
| 2751 |
-
def _save_scope_and_push_ocr(book_id, inc, exc, title):
|
| 2752 |
-
status, table, log_txt = save_book_scope(book_id, inc, exc, title)
|
| 2753 |
-
# Also push normalised values to OCR fields
|
| 2754 |
-
inc_clean = (inc or "").strip() or ""
|
| 2755 |
-
exc_clean = (exc or "").strip() or ""
|
| 2756 |
-
return status, table, log_txt, inc_clean, exc_clean
|
| 2757 |
|
| 2758 |
-
scope_save_btn.click(
|
| 2759 |
-
_save_scope_and_push_ocr,
|
| 2760 |
-
inputs=[scope_book_id, scope_include, scope_exclude, scope_title],
|
| 2761 |
-
outputs=[ingest_status, manifest_table, ingest_log, ocr_page_selection, ocr_page_exclusion],
|
| 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]
|
|
|
|
| 2748 |
scope_exclude = gr.Textbox(label="Story Pages Exclude", placeholder="e.g. 1,2,3,17,25", scale=1)
|
| 2749 |
scope_title = gr.Textbox(label="Safe Book Title", placeholder="e.g. the-gruffalo", scale=1)
|
| 2750 |
scope_save_btn = gr.Button("Save Book Pages β", size="sm")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2751 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2752 |
# ββ Auto-populate: book code + year β both book ID fields ββββββ
|
| 2753 |
def _make_book_id(code, year):
|
| 2754 |
code = (code or "").strip().lower()[:3]
|