Update app.py
Browse files
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 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|