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