Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def speech_recognize(audio, model_name):
|
|
| 21 |
|
| 22 |
yield text
|
| 23 |
|
| 24 |
-
with gr.Blocks(
|
| 25 |
with gr.Row():
|
| 26 |
with gr.Column():
|
| 27 |
audio = gr.Audio(sources=["microphone","upload"], type="filepath")
|
|
@@ -41,7 +41,7 @@ with gr.Blocks(concurrency_limit=4) as demo:
|
|
| 41 |
with gr.Column():
|
| 42 |
output = gr.Textbox(label="Transcription results")
|
| 43 |
|
| 44 |
-
audio.stop_recording(speech_recognize, inputs=[audio, model_name], outputs=[output])
|
| 45 |
-
audio.upload(speech_recognize, inputs=[audio, model_name], outputs=[output])
|
| 46 |
|
| 47 |
demo.queue(max_size=4).launch()
|
|
|
|
| 21 |
|
| 22 |
yield text
|
| 23 |
|
| 24 |
+
with gr.Blocks() as demo:
|
| 25 |
with gr.Row():
|
| 26 |
with gr.Column():
|
| 27 |
audio = gr.Audio(sources=["microphone","upload"], type="filepath")
|
|
|
|
| 41 |
with gr.Column():
|
| 42 |
output = gr.Textbox(label="Transcription results")
|
| 43 |
|
| 44 |
+
audio.stop_recording(speech_recognize, inputs=[audio, model_name], outputs=[output], concurrency_limit=4)
|
| 45 |
+
audio.upload(speech_recognize, inputs=[audio, model_name], outputs=[output], concurrency_limit=4)
|
| 46 |
|
| 47 |
demo.queue(max_size=4).launch()
|