Spaces:
Running
on
Zero
Running
on
Zero
TheStinger
commited on
Commit
·
36af447
1
Parent(s):
085da01
test for the progress bar
Browse files
app.py
CHANGED
@@ -2,15 +2,18 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from scipy.io.wavfile import write
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
11 |
|
12 |
title = "Ilaria UVR 💖"
|
13 |
-
description = "Drag and drop an audio file to easily separate it!
|
14 |
article = "Made with 💖 by Ilaria"
|
15 |
|
16 |
examples=[['test.mp3']]
|
@@ -22,4 +25,4 @@ gr.Interface(
|
|
22 |
description=description,
|
23 |
article=article,
|
24 |
examples=examples
|
25 |
-
).launch(
|
|
|
2 |
import gradio as gr
|
3 |
from scipy.io.wavfile import write
|
4 |
|
5 |
+
def inference(audio, progress=gr.Progress()):
|
6 |
+
progress(0, "Inizio...")
|
7 |
+
os.makedirs("out", exist_ok=True)
|
8 |
+
write('test.wav', audio[0], audio[1])
|
9 |
+
progress(33, "Separazione in corso...")
|
10 |
+
os.system("python3 -m demucs.separate -n htdemucs --two-stems=vocals -d cpu test.wav -o out")
|
11 |
+
progress(66, "Separazione completata...")
|
12 |
+
progress(100, "Finito!")
|
13 |
+
return "./out/htdemucs/test/vocals.wav","./out/htdemucs/test/no_vocals.wav"
|
14 |
|
15 |
title = "Ilaria UVR 💖"
|
16 |
+
description = "Drag and drop an audio file to easily separate it! Join AI Hub Discord Server.</p>"
|
17 |
article = "Made with 💖 by Ilaria"
|
18 |
|
19 |
examples=[['test.mp3']]
|
|
|
25 |
description=description,
|
26 |
article=article,
|
27 |
examples=examples
|
28 |
+
).launch()
|