terry-li-hm
commited on
Commit
·
1561f9d
1
Parent(s):
34b04bf
app.py
CHANGED
@@ -38,19 +38,18 @@ def launch():
|
|
38 |
gr.Markdown("# Cantonese Call Transcriber")
|
39 |
gr.Markdown("## Try an example:")
|
40 |
|
41 |
-
# Define components
|
42 |
audio_inputs = gr.Audio(label="Input")
|
43 |
text_outputs = gr.Textbox(lines=10, label="Output")
|
44 |
|
45 |
-
# Place the Examples component above the input
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
)
|
54 |
|
55 |
with gr.Row():
|
56 |
with gr.Column(scale=2):
|
|
|
38 |
gr.Markdown("# Cantonese Call Transcriber")
|
39 |
gr.Markdown("## Try an example:")
|
40 |
|
41 |
+
# Define components
|
42 |
audio_inputs = gr.Audio(label="Input")
|
43 |
text_outputs = gr.Textbox(lines=10, label="Output")
|
44 |
|
45 |
+
# Place the Examples component above the input and output
|
46 |
+
gr.Examples(
|
47 |
+
examples=[["example/scb.mp3"]],
|
48 |
+
inputs=[audio_inputs],
|
49 |
+
outputs=text_outputs,
|
50 |
+
fn=lambda x: model_inference(x, "yue"),
|
51 |
+
examples_per_page=1,
|
52 |
+
)
|
|
|
53 |
|
54 |
with gr.Row():
|
55 |
with gr.Column(scale=2):
|