CB commited on
Commit
584b5a7
·
verified ·
1 Parent(s): 88b1689

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +6 -4
streamlit_app.py CHANGED
@@ -164,16 +164,18 @@ if st.session_state["url"]:
164
  if st.session_state["videos"]:
165
 
166
  try:
167
- st.sidebar.video(st.session_state["videos"])
168
- loop = st.session_state.get("loop_video", False))
 
 
169
  except Exception as e:
170
  st.write("Couldn't show video")
171
 
172
  with st.sidebar.expander("Options", expanded=False):
173
  #Loop button
174
  loop_button = st.button("Toggle Loop", key="loop_button")
175
- if loop_button:
176
- st.session_state["loop_video"] = not st.session_state.get("loop_video", False)
177
 
178
  #Clear button
179
  st.button("Clear Video 🔥", on_click=_remove_all_videos, type="secondary", help="Clear all downloaded videos", use_container_width=True,)
 
164
  if st.session_state["videos"]:
165
 
166
  try:
167
+ st.sidebar.video(
168
+ st.session_state["videos"]
169
+ loop = st.session_state.get("loop_video", False)
170
+ )
171
  except Exception as e:
172
  st.write("Couldn't show video")
173
 
174
  with st.sidebar.expander("Options", expanded=False):
175
  #Loop button
176
  loop_button = st.button("Toggle Loop", key="loop_button")
177
+ if loop_button:
178
+ st.session_state["loop_video"] = not st.session_state.get("loop_video", False)
179
 
180
  #Clear button
181
  st.button("Clear Video 🔥", on_click=_remove_all_videos, type="secondary", help="Clear all downloaded videos", use_container_width=True,)