Paul Ke commited on
Commit
e156176
Β·
verified Β·
1 Parent(s): 35cfe03

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +11 -11
streamlit_app.py CHANGED
@@ -186,14 +186,14 @@ if st.button('Generate the story'):
186
  except Exception as error:
187
  st.sidebar.error(f"An error occurred: {error}")
188
 
189
- try:
190
- video_file = open(st.session_state["videos"], "rb")
191
- st.download_button(
192
- "**Download Video πŸ“**",
193
- data=video_file,
194
- file_name=f"{st.session_state['videos'].lower().translate(str.maketrans('', '', string.punctuation)).replace(' ', '_')}.mp4",
195
- mime="video/mp4",
196
- type="primary",
197
- )
198
- except Exception as e:
199
- st.error("Failed downloading the video", icon="πŸ˜”")
 
186
  except Exception as error:
187
  st.sidebar.error(f"An error occurred: {error}")
188
 
189
+ try:
190
+ video_file = open(st.session_state["videos"], "rb")
191
+ st.download_button(
192
+ "**Download Video πŸ“**",
193
+ data=video_file,
194
+ file_name=f"{st.session_state['videos'].lower().translate(str.maketrans('', '', string.punctuation)).replace(' ', '_')}.mp4",
195
+ mime="video/mp4",
196
+ type="primary",
197
+ )
198
+ except Exception as e:
199
+ st.error("Failed downloading the video", icon="πŸ˜”")