Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,7 @@ import gradio as gr
|
|
3 |
from scipy.io.wavfile import write, read
|
4 |
import subprocess
|
5 |
|
6 |
-
|
7 |
-
correct_password = os.getenv("MY_PASSWORD")
|
8 |
-
|
9 |
-
def inference(password, audio):
|
10 |
-
# Überprüfen, ob das eingegebene Passwort korrekt ist
|
11 |
-
if password != correct_password:
|
12 |
-
return ["Falsches Passwort! Zugriff verweigert."] * 4
|
13 |
-
|
14 |
# Erstellen eines Ausgabeordners, falls nicht vorhanden
|
15 |
os.makedirs("out", exist_ok=True)
|
16 |
|
@@ -41,12 +34,12 @@ def inference(password, audio):
|
|
41 |
return files
|
42 |
|
43 |
# Artikel für die Interface-Beschreibung
|
44 |
-
article = "Inspired by</p>"
|
45 |
|
46 |
# Gradio Interface
|
47 |
demo = gr.Interface(
|
48 |
fn=inference,
|
49 |
-
inputs=
|
50 |
outputs=[
|
51 |
gr.Audio(type="filepath", label="Vocals"),
|
52 |
gr.Audio(type="filepath", label="Bass"),
|
|
|
3 |
from scipy.io.wavfile import write, read
|
4 |
import subprocess
|
5 |
|
6 |
+
def inference(audio):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Erstellen eines Ausgabeordners, falls nicht vorhanden
|
8 |
os.makedirs("out", exist_ok=True)
|
9 |
|
|
|
34 |
return files
|
35 |
|
36 |
# Artikel für die Interface-Beschreibung
|
37 |
+
article = "Inspired by <p><a href='https://github.com/facebookresearch/demucs' target='_blank'>Demucs</a></p>\n<p>Copyright © 2023 JP Madsen</p>"
|
38 |
|
39 |
# Gradio Interface
|
40 |
demo = gr.Interface(
|
41 |
fn=inference,
|
42 |
+
inputs=gr.Audio(type="numpy", label="Input"),
|
43 |
outputs=[
|
44 |
gr.Audio(type="filepath", label="Vocals"),
|
45 |
gr.Audio(type="filepath", label="Bass"),
|