Spaces:
Sleeping
Sleeping
Claude commited on
Commit ·
c1acc29
1
Parent(s): a7ef977
fix: restore save_book_scope + merge OCR push into single handler
Browse files- smoke_signal_tab.py +8 -4
smoke_signal_tab.py
CHANGED
|
@@ -2869,12 +2869,16 @@ def smoke_signal_tab():
|
|
| 2869 |
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2870 |
)
|
| 2871 |
|
| 2872 |
-
#
|
| 2873 |
# Must be here — after ocr_page_selection is defined
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2874 |
scope_save_btn.click(
|
| 2875 |
-
|
| 2876 |
-
inputs=[scope_include, scope_exclude],
|
| 2877 |
-
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2878 |
)
|
| 2879 |
|
| 2880 |
|
|
|
|
| 2869 |
outputs=[ocr_page_selection, ocr_page_exclusion],
|
| 2870 |
)
|
| 2871 |
|
| 2872 |
+
# Save scope AND push to OCR fields in one handler
|
| 2873 |
# Must be here — after ocr_page_selection is defined
|
| 2874 |
+
def _save_scope_and_push(book_id, inc, exc, title):
|
| 2875 |
+
status, table, log_txt = save_book_scope(book_id, inc, exc, title)
|
| 2876 |
+
return status, table, log_txt, (inc or "").strip(), (exc or "").strip()
|
| 2877 |
+
|
| 2878 |
scope_save_btn.click(
|
| 2879 |
+
_save_scope_and_push,
|
| 2880 |
+
inputs=[scope_book_id, scope_include, scope_exclude, scope_title],
|
| 2881 |
+
outputs=[ingest_status, manifest_table, ingest_log, ocr_page_selection, ocr_page_exclusion],
|
| 2882 |
)
|
| 2883 |
|
| 2884 |
|