Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ 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(
|
| 24 |
-
return
|
| 25 |
|
| 26 |
url_demo = gr.Interface(
|
| 27 |
fn=transcribe_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(
|
| 27 |
fn=transcribe_url,
|