Update app.py
Browse files
app.py
CHANGED
@@ -117,7 +117,7 @@ def transcribe(audio_filepath, src_lang, tgt_lang, pnc):
|
|
117 |
|
118 |
|
119 |
with gr.Blocks(
|
120 |
-
title="
|
121 |
css="""
|
122 |
textarea { font-size: 18px;}
|
123 |
#model_output_text_box span {
|
@@ -135,20 +135,15 @@ with gr.Blocks(
|
|
135 |
gr.HTML(
|
136 |
"<p><b>Step 1:</b> Upload an audio file or record with your microphone.</p>"
|
137 |
|
138 |
-
|
139 |
-
"You can transcribe longer files locally with this NeMo "
|
140 |
-
"<a href='https://github.com/NVIDIA/NeMo/blob/main/examples/asr/speech_multitask/speech_to_text_aed_chunked_infer.py'>script</a>.</p>"
|
141 |
-
)
|
142 |
|
143 |
audio_file = gr.Audio(sources=["microphone"], type="filepath")
|
144 |
|
145 |
|
146 |
with gr.Column():
|
147 |
|
148 |
-
gr.HTML("<p><b>Step 3:</b> Run the model.</p>")
|
149 |
-
|
150 |
go_button = gr.Button(
|
151 |
-
value="
|
152 |
variant="primary", # make "primary" so it stands out (default is "secondary")
|
153 |
)
|
154 |
|
@@ -157,15 +152,6 @@ with gr.Blocks(
|
|
157 |
elem_id="model_output_text_box",
|
158 |
)
|
159 |
|
160 |
-
with gr.Row():
|
161 |
-
|
162 |
-
gr.HTML(
|
163 |
-
"<p style='text-align: center'>"
|
164 |
-
"π€ <a href='https://huggingface.co/nvidia/canary-1b' target='_blank'>Canary model</a> | "
|
165 |
-
"π§βπ» <a href='https://github.com/NVIDIA/NeMo' target='_blank'>NeMo Repository</a>"
|
166 |
-
"</p>"
|
167 |
-
)
|
168 |
-
|
169 |
go_button.click(
|
170 |
fn=transcribe,
|
171 |
inputs = [audio_file],
|
|
|
117 |
|
118 |
|
119 |
with gr.Blocks(
|
120 |
+
title="myAlexa",
|
121 |
css="""
|
122 |
textarea { font-size: 18px;}
|
123 |
#model_output_text_box span {
|
|
|
135 |
gr.HTML(
|
136 |
"<p><b>Step 1:</b> Upload an audio file or record with your microphone.</p>"
|
137 |
|
138 |
+
)
|
|
|
|
|
|
|
139 |
|
140 |
audio_file = gr.Audio(sources=["microphone"], type="filepath")
|
141 |
|
142 |
|
143 |
with gr.Column():
|
144 |
|
|
|
|
|
145 |
go_button = gr.Button(
|
146 |
+
value="Transcribe",
|
147 |
variant="primary", # make "primary" so it stands out (default is "secondary")
|
148 |
)
|
149 |
|
|
|
152 |
elem_id="model_output_text_box",
|
153 |
)
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
go_button.click(
|
156 |
fn=transcribe,
|
157 |
inputs = [audio_file],
|