Commit ·
52d8718
1
Parent(s): 36af447
Update app.py
Browse files123456789101112131415168 unmodified lines25262728import osimport gradio as grfrom scipy.io.wavfile import writedef inference(audio, progress=gr.Progress()):progress(0, "Inizio...")os.makedirs("out", exist_ok=True)write('test.wav', audio[0], audio[1])progress(33, "Separazione in corso...")os.system("python3 -m demucs.separate -n htdemucs --two-stems=vocals -d cpu test.wav -o out")progress(66, "Separazione completata...")progress(100, "Finito!")return "./out/htdemucs/test/vocals.wav","./out/htdemucs/test/no_vocals.wav"title = "Ilaria UVR 💖"description = "Drag and drop an audio file to easily separate it! Join AI Hub Discord Server.</p>"8 unmodified linesdescription=description,article=article,examples=examples).launch()1234567891011121314151617188 unmodified lines27282930import osimport gradio as grfrom scipy.io.wavfile import writeimport timedef inference(audio, progress=gr.Progress()):os.makedirs("out", exist_ok=True)write('test.wav', audio[0], audio[1])# Aggiungi il tuo codice per aggiornare la barra di progresso quifor i in progress.tqdm(range(10), desc="Rendering..."):time.sleep(0.1)os.system("python3 -m demucs.separate -n htdemucs --two-stems=vocals -d cpu test.wav -o out")return "./out/htdemucs/test/vocals.wav","./out/htdemucs/test/no_vocals.wav"title = "Ilaria UVR 💖"description = "Drag and drop an audio file to easily separate it! Join AI Hub Discord Server.</p>"8 unmodified linesdescription=description,article=article,examples=examples).launch(enable_queue=True)
app.py+11-9