Spaces:
Configuration error
Configuration error
Kangarroar
commited on
Commit
•
186e991
1
Parent(s):
8274b52
Update app.py
Browse files
app.py
CHANGED
@@ -2,18 +2,6 @@ import gradio as gr
|
|
2 |
|
3 |
s2t=gr.Interface.load('huggingface/facebook/s2t-medium-librispeech-asr')
|
4 |
|
5 |
-
|
6 |
-
def out(audio1,audio2):
|
7 |
-
if (audio1==None) and (audio2==None):
|
8 |
-
return "no audio","no audio"
|
9 |
-
elif audio1==None:
|
10 |
-
|
11 |
-
x=s2t(audio2)
|
12 |
-
return x, grammar(x)
|
13 |
-
else:
|
14 |
-
x=s2t(audio1)
|
15 |
-
return x, grammar(x)
|
16 |
-
|
17 |
iface = gr.Interface(
|
18 |
fn=out,
|
19 |
title="DIFF-SVC Cloud Rendering",
|
@@ -21,4 +9,4 @@ iface = gr.Interface(
|
|
21 |
inputs=[gr.inputs.Audio(source="upload", type="filepath", label=None, optional=True)],
|
22 |
)
|
23 |
|
24 |
-
iface.launch(enable_queue=True
|
|
|
2 |
|
3 |
s2t=gr.Interface.load('huggingface/facebook/s2t-medium-librispeech-asr')
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
iface = gr.Interface(
|
6 |
fn=out,
|
7 |
title="DIFF-SVC Cloud Rendering",
|
|
|
9 |
inputs=[gr.inputs.Audio(source="upload", type="filepath", label=None, optional=True)],
|
10 |
)
|
11 |
|
12 |
+
iface.launch(enable_queue=True)
|