Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,8 @@ def prepare_media(source_path_or_url: os.PathLike,
|
|
66 |
if source_type == 'audio_filepath':
|
67 |
audio_file = source_path_or_url
|
68 |
elif source_type == 'youtube_url':
|
69 |
-
os.
|
|
|
70 |
# # Download from youtube
|
71 |
with open(log_file, 'w') as lf:
|
72 |
audio_file = './downloaded/yt_audio'
|
|
|
66 |
if source_type == 'audio_filepath':
|
67 |
audio_file = source_path_or_url
|
68 |
elif source_type == 'youtube_url':
|
69 |
+
if os.path.exists('/download/yt_audio.mp3'):
|
70 |
+
os.remove('/download/yt_audio.mp3')
|
71 |
# # Download from youtube
|
72 |
with open(log_file, 'w') as lf:
|
73 |
audio_file = './downloaded/yt_audio'
|