Update app.py
Browse files
app.py
CHANGED
@@ -1,24 +1,25 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
from scipy.io.wavfile import write
|
4 |
-
|
5 |
-
|
6 |
def inference(audio):
|
7 |
os.makedirs("out", exist_ok=True)
|
8 |
write('test.wav', audio[0], audio[1])
|
9 |
-
|
|
|
|
|
10 |
return "./out/mdx_extra_q/test/vocals.wav","./out/mdx_extra_q/test/bass.wav",\
|
11 |
"./out/mdx_extra_q/test/drums.wav","./out/mdx_extra_q/test/other.wav"
|
12 |
|
13 |
-
title = "
|
14 |
-
description = "Gradio demo for
|
15 |
-
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>"
|
16 |
|
17 |
examples=[['elianap1.mp3'],['elianap2.mp3'],['elianap3.mp3']]
|
18 |
gr.Interface(
|
19 |
inference,
|
20 |
gr.inputs.Audio(type="numpy", label="Input"),
|
21 |
-
[gr.outputs.Audio(type="file", label="
|
22 |
title=title,
|
23 |
description=description,
|
24 |
article=article,
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
from scipy.io.wavfile import write
|
4 |
+
os.system("git clone https://github.com/tungedng2710/TonSpeech.git")
|
5 |
+
os.system("cd TonSpeech")
|
6 |
def inference(audio):
|
7 |
os.makedirs("out", exist_ok=True)
|
8 |
write('test.wav', audio[0], audio[1])
|
9 |
+
|
10 |
+
|
11 |
+
os.system("python se_cmgan.py --noisy test.wav")
|
12 |
return "./out/mdx_extra_q/test/vocals.wav","./out/mdx_extra_q/test/bass.wav",\
|
13 |
"./out/mdx_extra_q/test/drums.wav","./out/mdx_extra_q/test/other.wav"
|
14 |
|
15 |
+
title = "CMGAN"
|
16 |
+
description = "Gradio demo for cmgan: Music Source remocao de ruido "
|
|
|
17 |
|
18 |
examples=[['elianap1.mp3'],['elianap2.mp3'],['elianap3.mp3']]
|
19 |
gr.Interface(
|
20 |
inference,
|
21 |
gr.inputs.Audio(type="numpy", label="Input"),
|
22 |
+
[gr.outputs.Audio(type="file", label="Result")],
|
23 |
title=title,
|
24 |
description=description,
|
25 |
article=article,
|