Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
c188fc0
1
Parent(s):
b046e41
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ def inference(audio):
|
|
6 |
os.makedirs("out", exist_ok=True)
|
7 |
write('test.wav', audio[0], audio[1])
|
8 |
os.system("python3 -m demucs.separate -n demucs48_hq -d cpu test.wav -o out")
|
9 |
-
return "./out/demucs48_hq/test/vocals.wav","./out/demucs48_hq/test/bass.wav"
|
10 |
-
|
11 |
|
12 |
title = "Demucs"
|
13 |
description = "Gradio demo for Demucs: Music Source Separation in the Waveform Domain. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below."
|
@@ -16,7 +16,7 @@ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1911.132
|
|
16 |
examples=[['test.mp3']]
|
17 |
gr.Interface(
|
18 |
inference,
|
19 |
-
|
20 |
[gr.outputs.Audio(type="file", label="Vocals"),gr.outputs.Audio(type="file", label="Bass"),gr.outputs.Audio(type="file", label="Drums"),gr.outputs.Audio(type="file", label="Other")],
|
21 |
title=title,
|
22 |
description=description,
|
|
|
6 |
os.makedirs("out", exist_ok=True)
|
7 |
write('test.wav', audio[0], audio[1])
|
8 |
os.system("python3 -m demucs.separate -n demucs48_hq -d cpu test.wav -o out")
|
9 |
+
return "./out/demucs48_hq/test/vocals.wav","./out/demucs48_hq/test/bass.wav",\
|
10 |
+
"./out/demucs48_hq/test/drums.wav","./out/demucs48_hq/test/other.wav"
|
11 |
|
12 |
title = "Demucs"
|
13 |
description = "Gradio demo for Demucs: Music Source Separation in the Waveform Domain. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below."
|
|
|
16 |
examples=[['test.mp3']]
|
17 |
gr.Interface(
|
18 |
inference,
|
19 |
+
gr.inputs.Audio(type="numpy", label="Input"),
|
20 |
[gr.outputs.Audio(type="file", label="Vocals"),gr.outputs.Audio(type="file", label="Bass"),gr.outputs.Audio(type="file", label="Drums"),gr.outputs.Audio(type="file", label="Other")],
|
21 |
title=title,
|
22 |
description=description,
|