Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
ead1598
1
Parent(s):
b8447d0
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
os.system("midi_ddsp_download_model_weights")
|
4 |
+
def inference(audio):
|
5 |
+
os.system("midi_ddsp_synthesize --midi_path "+audio.name)
|
6 |
+
return str(audio.name)+"/0_violin.wav"
|
7 |
+
|
8 |
+
title = "Demucs"
|
9 |
+
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."
|
10 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1911.13254' target='_blank'>Music Source Separation in the Waveform Domain</a> | <a href='https://github.com/facebookresearch/demucs' target='_blank'>Github Repo</a></p>"
|
11 |
+
examples=[['test.mp3']]
|
12 |
+
gr.Interface(
|
13 |
+
inference,
|
14 |
+
gr.inputs.File(type="file", label="Input"),
|
15 |
+
[gr.outputs.Audio(type="filepath", label="Vocals")],
|
16 |
+
title=title,
|
17 |
+
description=description,
|
18 |
+
article=article,
|
19 |
+
examples=examples,
|
20 |
+
enable_queue=True
|
21 |
+
).launch(debug=True)
|