Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,20 +1,8 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
-
from scipy.io.wavfile import write
|
| 4 |
|
| 5 |
-
def
|
| 6 |
-
|
| 7 |
-
return None
|
| 8 |
-
os.makedirs("out", exist_ok=True)
|
| 9 |
-
rate, data = audio
|
| 10 |
-
write("input.wav", rate, data)
|
| 11 |
-
os.system("python3 -m demucs.separate -n htdemucs --two-stems=vocals -d cpu input.wav -o out")
|
| 12 |
-
return "out/htdemucs/input/vocals.wav"
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
inputs=gr.Audio(type="numpy", label="Upload audio"),
|
| 17 |
-
outputs=gr.Audio(type="filepath", label="Extracted Vocals"),
|
| 18 |
-
title="Fix My Recording – Vocal Cleaner",
|
| 19 |
-
description="Isolate vocals from music using Demucs. Powered by htdemucs."
|
| 20 |
-
)
|
|
|
|
| 1 |
+
# File: app.py
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
|
| 4 |
+
def greet(name):
|
| 5 |
+
return f"Hello {name}!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 8 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|