FredBonux commited on
Commit
93d0e9f
โ€ข
1 Parent(s): fed42dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -18,9 +18,13 @@ def transcribe(audio):
18
 
19
  def transcribe_url(url):
20
  youtube = YouTube(str(url))
 
21
  audio = youtube.streams.filter(only_audio=True).first().download('yt_video')
 
22
  text_it = pipe(audio)["text"]
 
23
  text_en = translator.translate_text(text_it, target_lang=TARGET_LANG).text
 
24
  return text_it, text_en
25
 
26
  url_demo = gr.Interface(
 
18
 
19
  def transcribe_url(url):
20
  youtube = YouTube(str(url))
21
+ print("Downloading video")
22
  audio = youtube.streams.filter(only_audio=True).first().download('yt_video')
23
+ print("Downloaded")
24
  text_it = pipe(audio)["text"]
25
+ print(f"{text_it}")
26
  text_en = translator.translate_text(text_it, target_lang=TARGET_LANG).text
27
+ print(f"{text_en}")
28
  return text_it, text_en
29
 
30
  url_demo = gr.Interface(