CB commited on
Commit
4ede0c1
·
verified ·
1 Parent(s): c20c8cb

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +0 -5
streamlit_app.py CHANGED
@@ -443,10 +443,6 @@ if st.sidebar.button("Load Video", use_container_width=True):
443
  except Exception:
444
  st.session_state["file_hash"] = None
445
  except Exception as e:
446
- # ensure state cleared on failure
447
- st.session_state["videos"] = ""
448
- st.session_state["last_loaded_path"] = ""
449
- st.session_state["file_hash"] = None
450
  st.sidebar.error(f"Failed to load video: {e}")
451
 
452
  if st.session_state["videos"]:
@@ -455,7 +451,6 @@ if st.session_state["videos"]:
455
  except Exception:
456
  st.sidebar.write("Couldn't preview video")
457
 
458
-
459
  with st.sidebar.expander("Options", expanded=False):
460
  loop_checkbox = st.checkbox("Enable Loop", value=st.session_state.get("loop_video", False))
461
  st.session_state["loop_video"] = loop_checkbox
 
443
  except Exception:
444
  st.session_state["file_hash"] = None
445
  except Exception as e:
 
 
 
 
446
  st.sidebar.error(f"Failed to load video: {e}")
447
 
448
  if st.session_state["videos"]:
 
451
  except Exception:
452
  st.sidebar.write("Couldn't preview video")
453
 
 
454
  with st.sidebar.expander("Options", expanded=False):
455
  loop_checkbox = st.checkbox("Enable Loop", value=st.session_state.get("loop_video", False))
456
  st.session_state["loop_video"] = loop_checkbox