Update app.py
Browse files
app.py
CHANGED
@@ -6,15 +6,15 @@ import subprocess
|
|
6 |
def inference(audio):
|
7 |
|
8 |
os.makedirs("out", exist_ok=True)
|
9 |
-
write('
|
10 |
|
11 |
-
command = "demucs -n mdx_extra_q -d cpu
|
12 |
-
process = subprocess.run(command,
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
# Check if files exist before returning
|
20 |
files = ["./out/mdx_extra_q/test/vocals.wav",
|
@@ -51,5 +51,5 @@ demo = gr.Interface(
|
|
51 |
|
52 |
)
|
53 |
|
54 |
-
demo.queue(concurrency_count =
|
55 |
demo.launch()
|
|
|
6 |
def inference(audio):
|
7 |
|
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,
|
15 |
+
stdout=subprocess.PIPE,
|
16 |
+
stderr=subprocess.PIPE
|
17 |
+
)
|
18 |
|
19 |
# Check if files exist before returning
|
20 |
files = ["./out/mdx_extra_q/test/vocals.wav",
|
|
|
51 |
|
52 |
)
|
53 |
|
54 |
+
demo.queue(concurrency_count = 10)
|
55 |
demo.launch()
|