Spaces:
Runtime error
Runtime error
Piano Guitar
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ def inference(audio):
|
|
| 12 |
os.makedirs("out", exist_ok=True)
|
| 13 |
write('test.wav', audio[0], audio[1])
|
| 14 |
|
| 15 |
-
command = "python3 -m demucs.separate -n
|
| 16 |
process = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
| 17 |
print("Demucs script output:", process.stdout.decode())
|
| 18 |
|
|
@@ -35,6 +35,8 @@ def inference(audio):
|
|
| 35 |
"./out/mdx_extra_q/test/bass.wav",
|
| 36 |
"./out/mdx_extra_q/test/drums.wav",
|
| 37 |
"./out/mdx_extra_q/test/other.wav",
|
|
|
|
|
|
|
| 38 |
]
|
| 39 |
|
| 40 |
|
|
@@ -57,6 +59,8 @@ gr.Interface(
|
|
| 57 |
gr.components.Audio(type="filepath", label="Bass"),
|
| 58 |
gr.components.Audio(type="filepath", label="Drums"),
|
| 59 |
gr.components.Audio(type="filepath", label="Other"),
|
|
|
|
|
|
|
| 60 |
],
|
| 61 |
title=title,
|
| 62 |
description=description,
|
|
|
|
| 12 |
os.makedirs("out", exist_ok=True)
|
| 13 |
write('test.wav', audio[0], audio[1])
|
| 14 |
|
| 15 |
+
command = "python3 -m demucs.separate -n htdemucs_6s -d cpu test.wav -o out"
|
| 16 |
process = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
| 17 |
print("Demucs script output:", process.stdout.decode())
|
| 18 |
|
|
|
|
| 35 |
"./out/mdx_extra_q/test/bass.wav",
|
| 36 |
"./out/mdx_extra_q/test/drums.wav",
|
| 37 |
"./out/mdx_extra_q/test/other.wav",
|
| 38 |
+
"./out/mdx_extra_q/test/piano.wav",
|
| 39 |
+
"./out/mdx_extra_q/test/guitar.wav",
|
| 40 |
]
|
| 41 |
|
| 42 |
|
|
|
|
| 59 |
gr.components.Audio(type="filepath", label="Bass"),
|
| 60 |
gr.components.Audio(type="filepath", label="Drums"),
|
| 61 |
gr.components.Audio(type="filepath", label="Other"),
|
| 62 |
+
gr.components.Audio(type="filepath", label="Piano"),
|
| 63 |
+
gr.components.Audio(type="filepath", label="Guitar"),
|
| 64 |
],
|
| 65 |
title=title,
|
| 66 |
description=description,
|