Spaces:
Runtime error
Runtime error
terry-li-hm
commited on
Commit
·
2fdad2f
1
Parent(s):
fa5f528
Update
Browse files
app.py
CHANGED
|
@@ -35,43 +35,21 @@ def model_inference(input_wav, language):
|
|
| 35 |
|
| 36 |
def launch():
|
| 37 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 38 |
-
with gr.Row():
|
| 39 |
-
with gr.Column(scale=2):
|
| 40 |
-
audio_inputs = gr.Audio()
|
| 41 |
-
# language_inputs = gr.Dropdown(
|
| 42 |
-
# choices=["auto", "zh", "en", "yue", "ja", "ko", "nospeech"],
|
| 43 |
-
# value="auto",
|
| 44 |
-
# label="Language",
|
| 45 |
-
# )
|
| 46 |
-
fn_button = gr.Button("Process Audio", variant="primary")
|
| 47 |
-
|
| 48 |
-
with gr.Column(scale=3):
|
| 49 |
-
text_outputs = gr.Textbox(lines=10)
|
| 50 |
-
|
| 51 |
with gr.Row():
|
| 52 |
gr.Examples(
|
| 53 |
-
examples=[["example/scb.mp3"]],
|
| 54 |
-
inputs=[audio_inputs],
|
| 55 |
outputs=text_outputs,
|
| 56 |
-
fn=lambda x: model_inference(x, "yue"),
|
| 57 |
)
|
| 58 |
-
# gr.Examples(
|
| 59 |
-
# examples=[["example/scb.mp3", "yue"]],
|
| 60 |
-
# inputs=[audio_inputs, language_inputs],
|
| 61 |
-
# outputs=text_outputs,
|
| 62 |
-
# fn=model_inference,
|
| 63 |
-
# )
|
| 64 |
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
# inputs=[audio_inputs, language_inputs],
|
| 73 |
-
# outputs=text_outputs,
|
| 74 |
-
# )
|
| 75 |
|
| 76 |
demo.launch()
|
| 77 |
|
|
|
|
| 35 |
|
| 36 |
def launch():
|
| 37 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
with gr.Row():
|
| 39 |
gr.Examples(
|
| 40 |
+
examples=[["example/scb.mp3"]],
|
| 41 |
+
inputs=[audio_inputs],
|
| 42 |
outputs=text_outputs,
|
| 43 |
+
fn=lambda x: model_inference(x, "yue"),
|
| 44 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
with gr.Row():
|
| 47 |
+
with gr.Column(scale=2):
|
| 48 |
+
audio_inputs = gr.Audio(label="Input")
|
| 49 |
+
fn_button = gr.Button("Process Audio", variant="primary")
|
| 50 |
+
|
| 51 |
+
with gr.Column(scale=3):
|
| 52 |
+
text_outputs = gr.Textbox(lines=10, label="Output")
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
demo.launch()
|
| 55 |
|