Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
4f9cc75
1
Parent(s):
3c03534
Update app.py
Browse files
app.py
CHANGED
@@ -5,16 +5,16 @@ import sys
|
|
5 |
sys.path.append('.')
|
6 |
import gradio as gr
|
7 |
os.system('pip install -U torchtext==0.8.0')
|
8 |
-
os.system('python setup.py install --install-dir .')
|
9 |
|
10 |
-
|
11 |
|
12 |
def inference(audio):
|
13 |
-
|
14 |
-
|
15 |
-
os.system('python separate_scripts/separate.py --audio_path=' +audio.name+' --source_type="accompaniment"')
|
16 |
-
os.system('python separate_scripts/separate.py --audio_path=' +audio.name+' --source_type="vocals"')
|
17 |
-
return 'sep_vocals.
|
18 |
title = "Music Source Separation"
|
19 |
description = "Gradio demo for Music Source Separation. To use it, simply add your audio, or click one of the examples to load them. Read more at the links below. Currently supports .wav files"
|
20 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.05418'>Decoupling Magnitude and Phase Estimation with Deep ResUNet for Music Source Separation</a> | <a href='https://github.com/bytedance/music_source_separation'>Github Repo</a></p>"
|
|
|
5 |
sys.path.append('.')
|
6 |
import gradio as gr
|
7 |
os.system('pip install -U torchtext==0.8.0')
|
8 |
+
#os.system('python setup.py install --install-dir .')
|
9 |
|
10 |
+
os.system('./separate_scripts/download_checkpoints.sh')
|
11 |
|
12 |
def inference(audio):
|
13 |
+
os.system('./separate_scripts/separate_vocals.sh ' + audio.name + ' "sep_vocals.mp3"')
|
14 |
+
os.system('./separate_scripts/separate_accompaniment.sh ' + audio.name + ' "sep_accompaniment.mp3"')
|
15 |
+
#os.system('python separate_scripts/separate.py --audio_path=' +audio.name+' --source_type="accompaniment"')
|
16 |
+
#os.system('python separate_scripts/separate.py --audio_path=' +audio.name+' --source_type="vocals"')
|
17 |
+
return 'sep_vocals.mp3', 'sep_accompaniment.mp3'
|
18 |
title = "Music Source Separation"
|
19 |
description = "Gradio demo for Music Source Separation. To use it, simply add your audio, or click one of the examples to load them. Read more at the links below. Currently supports .wav files"
|
20 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.05418'>Decoupling Magnitude and Phase Estimation with Deep ResUNet for Music Source Separation</a> | <a href='https://github.com/bytedance/music_source_separation'>Github Repo</a></p>"
|