sanchit-gandhi HF staff commited on
Commit
2eba696
1 Parent(s): 6408f34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -219,7 +219,7 @@ def transcribe_yt(yt_url, group_by_speaker=True):
219
  api_name="/predict_2",
220
  )
221
 
222
- _return_yt_html_embed(yt_url)
223
  with tempfile.TemporaryDirectory() as tmpdirname:
224
  filepath = os.path.join(tmpdirname, "video.mp4")
225
  download_yt_audio(yt_url, filepath)
@@ -242,7 +242,7 @@ def transcribe_yt(yt_url, group_by_speaker=True):
242
  # align the ASR transcriptions and diarization timestamps
243
  transcription = align(transcription, segments, group_by_speaker=group_by_speaker)
244
 
245
- return transcription
246
 
247
 
248
  title = "Whisper JAX + Speaker Diarization ⚡️"
 
219
  api_name="/predict_2",
220
  )
221
 
222
+ html_embed_str = _return_yt_html_embed(yt_url)
223
  with tempfile.TemporaryDirectory() as tmpdirname:
224
  filepath = os.path.join(tmpdirname, "video.mp4")
225
  download_yt_audio(yt_url, filepath)
 
242
  # align the ASR transcriptions and diarization timestamps
243
  transcription = align(transcription, segments, group_by_speaker=group_by_speaker)
244
 
245
+ return html_embed_str, transcription
246
 
247
 
248
  title = "Whisper JAX + Speaker Diarization ⚡️"