gholapeajinkya commited on
Commit
90cba0a
·
verified ·
1 Parent(s): c4f35b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -566,13 +566,14 @@ if __name__ == "__main__":
566
  st.write("Video Input Options")
567
  # video_file = st.file_uploader("Upload a MP4 video file", type=[
568
  # "mp4"], disabled=st.session_state.is_processing, on_change=set_processing, args=(True,))
569
- # if video_file is not None:
570
- # # Write uploaded file to a stable location
571
- # save_path = os.path.join("/tmp", video_file.name)
572
- # with open(save_path, "wb") as f:
573
- # f.write(video_file.read())
574
- # st.video(save_path) # Use the saved file path, not internal Streamlit ID
575
- # st.success(f"Saved and loaded video from: {save_path}")
 
576
  # st.write("OR")
577
  video_url = st.text_input(
578
  "Enter the URL of a MP4 video (Youtube or other)",
 
566
  st.write("Video Input Options")
567
  # video_file = st.file_uploader("Upload a MP4 video file", type=[
568
  # "mp4"], disabled=st.session_state.is_processing, on_change=set_processing, args=(True,))
569
+ video_file = None
570
+ if video_file is not None:
571
+ # Write uploaded file to a stable location
572
+ save_path = os.path.join("/tmp", video_file.name)
573
+ with open(save_path, "wb") as f:
574
+ f.write(video_file.read())
575
+ st.video(save_path) # Use the saved file path, not internal Streamlit ID
576
+ st.success(f"Saved and loaded video from: {save_path}")
577
  # st.write("OR")
578
  video_url = st.text_input(
579
  "Enter the URL of a MP4 video (Youtube or other)",