Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def inference(audio):
|
|
8 |
os.makedirs("out", exist_ok=True)
|
9 |
write('mix.wav', audio[0], audio[1])
|
10 |
|
11 |
-
command = "demucs -n mdx_extra_q -d cpu mix.wav -o out"
|
12 |
process = subprocess.run(command,
|
13 |
shell=True,
|
14 |
stdin=subprocess.DEVNULL,
|
@@ -17,10 +17,10 @@ def inference(audio):
|
|
17 |
)
|
18 |
|
19 |
# Check if files exist before returning
|
20 |
-
files = ["
|
21 |
-
"
|
22 |
-
"
|
23 |
-
"
|
24 |
|
25 |
for file in files:
|
26 |
if not os.path.isfile(file):
|
@@ -51,5 +51,5 @@ demo = gr.Interface(
|
|
51 |
|
52 |
)
|
53 |
|
54 |
-
demo.queue(concurrency_count = 10)
|
55 |
demo.launch()
|
|
|
8 |
os.makedirs("out", exist_ok=True)
|
9 |
write('mix.wav', audio[0], audio[1])
|
10 |
|
11 |
+
command = "python3 -m demucs -n mdx_extra_q -d cpu mix.wav -o out"
|
12 |
process = subprocess.run(command,
|
13 |
shell=True,
|
14 |
stdin=subprocess.DEVNULL,
|
|
|
17 |
)
|
18 |
|
19 |
# Check if files exist before returning
|
20 |
+
files = ["out/mdx_extra_q/test/vocals.wav",
|
21 |
+
"out/mdx_extra_q/test/bass.wav",
|
22 |
+
"out/mdx_extra_q/test/drums.wav",
|
23 |
+
"out/mdx_extra_q/test/other.wav"]
|
24 |
|
25 |
for file in files:
|
26 |
if not os.path.isfile(file):
|
|
|
51 |
|
52 |
)
|
53 |
|
54 |
+
#demo.queue(concurrency_count = 10)
|
55 |
demo.launch()
|