TheStinger commited on
Commit
776637b
1 Parent(s): 52d8718

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -1,30 +1,25 @@
1
  import os
2
  import gradio as gr
3
  from scipy.io.wavfile import write
4
- import time
5
 
6
- def inference(audio, progress=gr.Progress()):
 
7
  os.makedirs("out", exist_ok=True)
8
  write('test.wav', audio[0], audio[1])
9
-
10
- # Aggiungi il tuo codice per aggiornare la barra di progresso qui
11
- for i in progress.tqdm(range(10), desc="Rendering..."):
12
- time.sleep(0.1)
13
-
14
  os.system("python3 -m demucs.separate -n htdemucs --two-stems=vocals -d cpu test.wav -o out")
15
  return "./out/htdemucs/test/vocals.wav","./out/htdemucs/test/no_vocals.wav"
16
 
17
  title = "Ilaria UVR 💖"
18
- description = "Drag and drop an audio file to easily separate it! Join AI Hub Discord Server.</p>"
19
  article = "Made with 💖 by Ilaria"
20
 
21
  examples=[['test.mp3']]
22
  gr.Interface(
23
  inference,
24
- gr.Audio(type="numpy", label="Song"),
25
- [gr.Audio(type="filepath", label="Vocals"),gr.Audio(type="filepath", label="Instrumentals")],
26
  title=title,
27
  description=description,
28
  article=article,
29
  examples=examples
30
- ).launch(enable_queue=True)
 
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
  os.system("python3 -m demucs.separate -n htdemucs --two-stems=vocals -d cpu test.wav -o out")
10
  return "./out/htdemucs/test/vocals.wav","./out/htdemucs/test/no_vocals.wav"
11
 
12
  title = "Ilaria UVR 💖"
13
+ description = "Trascina un file audio e separalo facilmente! [Supportami su Ko-Fi](https://ko-fi.com/ilariaowo).</p>"
14
  article = "Made with 💖 by Ilaria"
15
 
16
  examples=[['test.mp3']]
17
  gr.Interface(
18
  inference,
19
+ gr.Audio(type="numpy", label="Canzone"),
20
+ [gr.Audio(type="filepath", label="Vocale"),gr.Audio(type="filepath", label="Strumentale")],
21
  title=title,
22
  description=description,
23
  article=article,
24
  examples=examples
25
+ ).launch(enable_queue=True)