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

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +10 -11
streamlit_app.py CHANGED
@@ -57,7 +57,7 @@ def _remove_all_videos():
57
  except FileNotFoundError:
58
  print("Couldn't delete file:", video)
59
 
60
- expander = st.sidebar.expander("Options", expanded=False)
61
  #API KEY
62
  API_KEY = expander.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
63
  if API_KEY:
@@ -148,16 +148,15 @@ 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
- 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",
 
57
  except FileNotFoundError:
58
  print("Couldn't delete file:", video)
59
 
60
+ expander = st.sidebar.expander("Options", expanded=True)
61
  #API KEY
62
  API_KEY = expander.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
63
  if API_KEY:
 
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",