Spaces:
Runtime error
Runtime error
MohamedRashad
commited on
Commit
•
2960a73
1
Parent(s):
6387b31
Fix paths
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ from pydub import AudioSegment
|
|
7 |
from pytube import YouTube
|
8 |
|
9 |
available_model = ["UVR-MDX-NET-Inst_HQ_3", "UVR-MDX-NET-Voc_FT", "UVR_MDXNET_KARA_2", "Kim_Vocal_2", "UVR_MDXNET_Main"]
|
|
|
10 |
|
11 |
def reduce_audio_size(audio_path):
|
12 |
s1 = AudioSegment.from_file(audio_path)
|
@@ -14,9 +15,9 @@ def reduce_audio_size(audio_path):
|
|
14 |
|
15 |
|
16 |
def audio_sep(youtube_url, audio_path, separation_model, separation_mode, progress=gr.Progress()):
|
17 |
-
out_folder =
|
18 |
out_folder.mkdir(exist_ok=True)
|
19 |
-
temp_folder =
|
20 |
temp_folder.mkdir(exist_ok=True)
|
21 |
|
22 |
print(youtube_url)
|
@@ -98,4 +99,4 @@ gr.Interface(
|
|
98 |
title="Audio Separator",
|
99 |
description="<center>Separate the music and vocal from the input audio</center>",
|
100 |
allow_flagging=False,
|
101 |
-
).queue().launch(share=False, favicon_path=
|
|
|
7 |
from pytube import YouTube
|
8 |
|
9 |
available_model = ["UVR-MDX-NET-Inst_HQ_3", "UVR-MDX-NET-Voc_FT", "UVR_MDXNET_KARA_2", "Kim_Vocal_2", "UVR_MDXNET_Main"]
|
10 |
+
base_path = Path(__file__).parent
|
11 |
|
12 |
def reduce_audio_size(audio_path):
|
13 |
s1 = AudioSegment.from_file(audio_path)
|
|
|
15 |
|
16 |
|
17 |
def audio_sep(youtube_url, audio_path, separation_model, separation_mode, progress=gr.Progress()):
|
18 |
+
out_folder = base_path / "audio_filtered"
|
19 |
out_folder.mkdir(exist_ok=True)
|
20 |
+
temp_folder = base_path / "tmp"
|
21 |
temp_folder.mkdir(exist_ok=True)
|
22 |
|
23 |
print(youtube_url)
|
|
|
99 |
title="Audio Separator",
|
100 |
description="<center>Separate the music and vocal from the input audio</center>",
|
101 |
allow_flagging=False,
|
102 |
+
).queue().launch(share=False, favicon_path=base_path / "audiomack.svg")
|