Paul Ke commited on
Commit
1197d6b
·
verified ·
1 Parent(s): 9714d81

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +10 -9
streamlit_app.py CHANGED
@@ -148,15 +148,16 @@ st.sidebar.text_input(
148
  with st.sidebar.expander("Options", expanded=False):
149
  st.text_input("Video Password", key="video-password", placeholder="Enter Video Password")
150
 
151
- download = st.sidebar.button("Load Video")
152
- if download:
153
- download_options = {}
154
- if st.session_state["video-password"]:
155
- download_options["videopassword"] = st.session_state["video-password"]
156
- video_path = download_video(
157
- st.session_state["url"], save_path=os.path.join(".", "data"), **download_options
158
- )
159
- st.session_state["videos"] = video_path
 
160
 
161
  st.sidebar.button(
162
  "Clear Videos",
 
148
  with st.sidebar.expander("Options", expanded=False):
149
  st.text_input("Video Password", key="video-password", placeholder="Enter Video Password")
150
 
151
+ if st.session_state["url"]:
152
+ download = st.sidebar.button("Load Video")
153
+ if download:
154
+ download_options = {}
155
+ if st.session_state["video-password"]:
156
+ download_options["videopassword"] = st.session_state["video-password"]
157
+ video_path = download_video(
158
+ st.session_state["url"], save_path=os.path.join(".", "data"), **download_options
159
+ )
160
+ st.session_state["videos"] = video_path
161
 
162
  st.sidebar.button(
163
  "Clear Videos",