Paul Ke commited on
Commit
23ab7fe
Β·
verified Β·
1 Parent(s): 602c5c9

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +12 -11
streamlit_app.py CHANGED
@@ -163,17 +163,18 @@ if st.session_state["videos"]:
163
  st.sidebar.video(st.session_state["videos"])
164
  except Exception as e:
165
  st.write("Couldn't show video")
166
- try:
167
- video_file = open(st.session_state["videos"], "rb")
168
- st.sidebar.download_button(
169
- "**Download Video πŸ“**",
170
- data=video_file,
171
- file_name=f"{st.session_state['videos'].lower().translate(str.maketrans('', '', string.punctuation)).replace(' ', '_')}.mp4",
172
- mime="video/mp4",
173
- type="primary",
174
- )
175
- except Exception as e:
176
- st.error("Failed downloading the video", icon="πŸ˜”")
 
177
 
178
  # Analysis prompt
179
  analysis_prompt = st.sidebar.text_area("Enter analysis")
 
163
  st.sidebar.video(st.session_state["videos"])
164
  except Exception as e:
165
  st.write("Couldn't show video")
166
+
167
+ try:
168
+ video_file = open(st.session_state["videos"], "rb")
169
+ st.sidebar.download_button(
170
+ "**Download Video πŸ“**",
171
+ data=video_file,
172
+ file_name=f"{st.session_state['videos'].lower().translate(str.maketrans('', '', string.punctuation)).replace(' ', '_')}.mp4",
173
+ mime="video/mp4",
174
+ type="primary",
175
+ )
176
+ except Exception as e:
177
+ st.error("Failed downloading the video", icon="πŸ˜”")
178
 
179
  # Analysis prompt
180
  analysis_prompt = st.sidebar.text_area("Enter analysis")