nrotem commited on
Commit
62375dd
·
1 Parent(s): b2ed349
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
  import subprocess
 
3
 
4
  def combine_video_subtitle(video_file, subtitle_file):
5
  # Output video file name
@@ -33,4 +34,11 @@ if video_file and subtitle_file:
33
  st.write("Combining... Please wait.")
34
  output_filename = combine_video_subtitle(video_file, subtitle_file)
35
  st.success("Video and subtitle combined successfully!")
36
- st.download_button("Download Combined Video", output_filename)
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
  import subprocess
3
+ import os
4
 
5
  def combine_video_subtitle(video_file, subtitle_file):
6
  # Output video file name
 
34
  st.write("Combining... Please wait.")
35
  output_filename = combine_video_subtitle(video_file, subtitle_file)
36
  st.success("Video and subtitle combined successfully!")
37
+
38
+ # Display the combined video
39
+ with open(output_filename, "rb") as f:
40
+ video_bytes = f.read()
41
+ st.video(video_bytes)
42
+
43
+ # Provide a link to download the combined video
44
+ st.download_button("Download Combined Video", video_bytes, file_name=output_filename)