Claude commited on
Commit
51754bb
Β·
1 Parent(s): 9021659

fix: scope->OCR wiring after ocr_page_selection defined, no more UnboundLocalError

Browse files
Files changed (1) hide show
  1. 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: