tensorkelechi commited on
Commit
a95a5a4
·
verified ·
1 Parent(s): 77e2bcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -34,7 +34,7 @@ def audio_extraction(video_file, output_format):
34
  # temp_filename = video_file.name
35
  # video_path = f"{temp_filename}"
36
  audio = extract_audio(
37
- input_path=os.fspath(video_file), output_path=f"{str(video_file)[:-4]}.mp3", output_format=f"{output_format}"
38
  )
39
  return audio
40
 
@@ -76,7 +76,8 @@ with youtube_url_tab:
76
  if url:
77
  if st.button("Transcribe", key="yturl"):
78
  with st.spinner("Transcribing..."):
79
- ytvideo_transcript = transcribe_video(yt_video)
 
80
  st.success(f"Transcription successful")
81
  st.write(ytvideo_transcript)
82
  if st.button("Generate Summary"):
 
34
  # temp_filename = video_file.name
35
  # video_path = f"{temp_filename}"
36
  audio = extract_audio(
37
+ input_path=os.fspath(video_file), output_path=f"{str(video_file)[:-4]}.{output_format}", output_format=f"{output_format}"
38
  )
39
  return audio
40
 
 
76
  if url:
77
  if st.button("Transcribe", key="yturl"):
78
  with st.spinner("Transcribing..."):
79
+ audio = audio_extraction(yt_video, "wav")
80
+ ytvideo_transcript = transcribe_video(audio)
81
  st.success(f"Transcription successful")
82
  st.write(ytvideo_transcript)
83
  if st.button("Generate Summary"):