Spaces:
Runtime error
Runtime error
terry-li-hm
commited on
Commit
·
98c06b0
1
Parent(s):
b2b2704
Update
Browse files
app.py
CHANGED
|
@@ -35,7 +35,14 @@ def model_inference(input_wav, language):
|
|
| 35 |
|
| 36 |
def launch():
|
| 37 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
|
| 38 |
gr.Markdown("## Try an example:")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
with gr.Row():
|
| 40 |
gr.Examples(
|
| 41 |
examples=[["example/scb.mp3"]],
|
|
@@ -48,11 +55,13 @@ def launch():
|
|
| 48 |
|
| 49 |
with gr.Row():
|
| 50 |
with gr.Column(scale=2):
|
| 51 |
-
|
|
|
|
| 52 |
fn_button = gr.Button("Process Audio", variant="primary")
|
| 53 |
|
| 54 |
with gr.Column(scale=3):
|
| 55 |
-
|
|
|
|
| 56 |
|
| 57 |
demo.launch()
|
| 58 |
|
|
|
|
| 35 |
|
| 36 |
def launch():
|
| 37 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 38 |
+
gr.Markdown("# Cantonese Call Transcriber")
|
| 39 |
gr.Markdown("## Try an example:")
|
| 40 |
+
|
| 41 |
+
# Define components first
|
| 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 |
with gr.Row():
|
| 47 |
gr.Examples(
|
| 48 |
examples=[["example/scb.mp3"]],
|
|
|
|
| 55 |
|
| 56 |
with gr.Row():
|
| 57 |
with gr.Column(scale=2):
|
| 58 |
+
# Audio input is already defined, just reference it here
|
| 59 |
+
audio_inputs
|
| 60 |
fn_button = gr.Button("Process Audio", variant="primary")
|
| 61 |
|
| 62 |
with gr.Column(scale=3):
|
| 63 |
+
# Text output is already defined, just reference it here
|
| 64 |
+
text_outputs
|
| 65 |
|
| 66 |
demo.launch()
|
| 67 |
|