JoshMe1 commited on
Commit
ae4618e
·
1 Parent(s): 03efc81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -55,10 +55,16 @@ if st.button("Transcribe"):
55
  transcript = get_transcript(url, model_size, lang, format)
56
  st.text_area("Transcription of the video", transcript)
57
  if format == ".srt":
58
- if st.button("Download transcript"):
59
- if save_srt(transcript):
60
- st.success("Transcript downloaded successfully!")
61
- else:
62
- st.error("Failed to download transcript.")
 
 
 
 
 
 
63
 
64
 
 
55
  transcript = get_transcript(url, model_size, lang, format)
56
  st.text_area("Transcription of the video", transcript)
57
  if format == ".srt":
58
+ save_srt(transcript)
59
+ if st.button("Download Transcript"):
60
+ file_ = open("transcript.srt", "rb")
61
+ contents = file_.read()
62
+ file_.close()
63
+ st.download_button(
64
+ label="Download Transcript",
65
+ data=contents,
66
+ file_name="done.srt",
67
+ mime="text/srt"
68
+ )
69
 
70