Spaces:
Paused
Paused
Update app.py
Browse files
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]}.
|
| 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 |
-
|
|
|
|
| 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"):
|