Commit
·
bf691a8
1
Parent(s):
fc16c10
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def inference(audio):
|
|
21 |
result = whisper.decode(model, mel, options)
|
22 |
|
23 |
print(result.text)
|
24 |
-
return result.text, gr.update(visible=True)
|
25 |
|
26 |
|
27 |
|
@@ -173,7 +173,7 @@ with block:
|
|
173 |
btn = gr.Button("Transcribe")
|
174 |
text = gr.Textbox(show_label=False, elem_id="result-textarea")
|
175 |
|
176 |
-
btn.click(inference, inputs=[audio], outputs=[text,
|
177 |
|
178 |
gr.HTML('''
|
179 |
<div class="footer">
|
|
|
21 |
result = whisper.decode(model, mel, options)
|
22 |
|
23 |
print(result.text)
|
24 |
+
return result.text, gr.update(visible=True)
|
25 |
|
26 |
|
27 |
|
|
|
173 |
btn = gr.Button("Transcribe")
|
174 |
text = gr.Textbox(show_label=False, elem_id="result-textarea")
|
175 |
|
176 |
+
btn.click(inference, inputs=[audio], outputs=[text, loading_icon], api_name="transcribe")
|
177 |
|
178 |
gr.HTML('''
|
179 |
<div class="footer">
|