Spaces:
Build error
Build error
Paul Ke commited on
Update streamlit_app.py
Browse files- 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 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
| 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",
|