tee342 commited on
Commit
e05534b
·
verified ·
1 Parent(s): 2d540b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -17
app.py CHANGED
@@ -1,20 +1,8 @@
1
- import os
2
  import gradio as gr
3
- from scipy.io.wavfile import write
4
 
5
- def extract_vocals(audio):
6
- if audio is None:
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
- app = gr.Interface(
15
- fn=extract_vocals,
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()