MogensR commited on
Commit
a6d7c1b
·
verified ·
1 Parent(s): a63e3db

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +6 -2
ui.py CHANGED
@@ -145,7 +145,11 @@ def render_ui(process_video_func):
145
  background = selected_color # "#RRGGBB"
146
  # --- Process Button ---
147
  st.header("3. Process Video")
148
- can_process = (uploaded_video is not None and not st.session_state.get('processing', False) and (background is not None))
 
 
 
 
149
  if st.button("Process Video", disabled=not can_process, use_container_width=True):
150
  try:
151
  logger.info("Process Video button clicked")
@@ -153,7 +157,7 @@ def render_ui(process_video_func):
153
  st.error("Please upload a background image")
154
  return
155
  with st.spinner("Processing video..."):
156
- # NOTE: Always pass lowercased bg_type!
157
  success = process_video_func(uploaded_video, background, bg_type.lower())
158
  if success:
159
  st.success("Video processing complete!")
 
145
  background = selected_color # "#RRGGBB"
146
  # --- Process Button ---
147
  st.header("3. Process Video")
148
+ can_process = (
149
+ uploaded_video is not None
150
+ and not st.session_state.get('processing', False)
151
+ and (background is not None)
152
+ )
153
  if st.button("Process Video", disabled=not can_process, use_container_width=True):
154
  try:
155
  logger.info("Process Video button clicked")
 
157
  st.error("Please upload a background image")
158
  return
159
  with st.spinner("Processing video..."):
160
+ # === FIX: Always pass lowercased bg_type as third argument ===
161
  success = process_video_func(uploaded_video, background, bg_type.lower())
162
  if success:
163
  st.success("Video processing complete!")