Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ def get_audio(url):
|
|
15 |
}
|
16 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
17 |
info = ydl.extract_info(url, download=True)
|
18 |
-
# Use
|
19 |
-
audio_file =
|
20 |
return audio_file
|
21 |
except Exception as e:
|
22 |
raise gr.Error(f"Exception: {e}")
|
|
|
15 |
}
|
16 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
17 |
info = ydl.extract_info(url, download=True)
|
18 |
+
# Use 'filepath' from the info dictionary to get the downloaded file path
|
19 |
+
audio_file = info['filepath']
|
20 |
return audio_file
|
21 |
except Exception as e:
|
22 |
raise gr.Error(f"Exception: {e}")
|