Spaces:
Running
on
Zero
Running
on
Zero
Helw150
commited on
Commit
•
fe1e574
1
Parent(s):
a4ccadb
Slightly Better UX
Browse files
app.py
CHANGED
@@ -52,17 +52,20 @@ def diva_audio(audio_input, do_sample=False, temperature=0.001):
|
|
52 |
|
53 |
|
54 |
def transcribe_wrapper(audio_input, state, model_order):
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
"",
|
61 |
-
|
62 |
-
|
|
|
|
|
63 |
|
64 |
yield from transcribe(audio_input, state, model_order)
|
65 |
|
|
|
66 |
@spaces.GPU
|
67 |
def transcribe(audio_input, state, model_order):
|
68 |
if audio_input == None:
|
@@ -189,7 +192,7 @@ with gr.Blocks(theme=theme) as demo:
|
|
189 |
btn,
|
190 |
)
|
191 |
btn.click(
|
192 |
-
fn=
|
193 |
inputs=[audio_input, state, model_order],
|
194 |
outputs=[btn, out1, state],
|
195 |
)
|
|
|
52 |
|
53 |
|
54 |
def transcribe_wrapper(audio_input, state, model_order):
|
55 |
+
spinner = "◒"
|
56 |
+
yield (
|
57 |
+
gr.Button(
|
58 |
+
value=spinner + " Generating Responses " + spinner,
|
59 |
+
interactive=False,
|
60 |
+
variant="primary",
|
61 |
+
),
|
62 |
+
"",
|
63 |
+
state,
|
64 |
+
)
|
65 |
|
66 |
yield from transcribe(audio_input, state, model_order)
|
67 |
|
68 |
+
|
69 |
@spaces.GPU
|
70 |
def transcribe(audio_input, state, model_order):
|
71 |
if audio_input == None:
|
|
|
192 |
btn,
|
193 |
)
|
194 |
btn.click(
|
195 |
+
fn=transcribe_wrapper,
|
196 |
inputs=[audio_input, state, model_order],
|
197 |
outputs=[btn, out1, state],
|
198 |
)
|