imorcillo commited on
Commit
d4749c2
·
verified ·
1 Parent(s): 6c5997e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -45
app.py CHANGED
@@ -220,52 +220,52 @@ with demo:
220
  ok_button = gr.Button("OK", elem_id="ok-button")
221
  ok_button.click(fn=start_app, outputs=[intro, app_block])
222
 
223
- #with app_block:
224
 
225
- gr.HTML("""
226
- <div id="header">
227
- <h1>LANGSWITCH</h1>
228
- <h3>Multilingual Automatic Speech Recognition in noisy environments</h3>
229
- </div>
230
- """)
231
-
232
- with gr.Tab("Transcribe microphone"):
233
- iface = gr.Interface(
234
- fn=transcribe_mic,
235
- inputs=[
236
- gr.Audio(sources="microphone", type="filepath"),
237
- gr.Dropdown(label="Language", choices=[("English", "en"),
238
- ("Euskara", "eu"),
239
- ("Español", "es"),
240
- ("Français", "fr"),
241
- ("Italiano", "it")],
242
- value="en")
243
- ],
244
- outputs=[
245
- gr.Textbox(label="Transcription", autoscroll=False),
246
- #gr.Textbox(label="Speaker Identification", autoscroll=False)
247
- ],
248
- allow_flagging="never",
249
- )
250
-
251
- with gr.Tab("Transcribe local file"):
252
- iface = gr.Interface(
253
- fn=transcribe_file,
254
- inputs=[
255
- gr.Audio(sources="upload", type="filepath"),
256
- gr.Dropdown(choices=[("English", "en"),
257
- ("Euskara", "eu"),
258
- ("Español", "es"),
259
- ("Français", "fr"),
260
- ("Italiano", "it")],
261
- value="en")
262
- ],
263
- outputs=[
264
- gr.Textbox(label="Transcription", autoscroll=False),
265
- #gr.Textbox(label="Speaker Identification", autoscroll=False)
266
- ],
267
- allow_flagging="never",
268
- )
269
 
270
 
271
  gr.HTML("""
 
220
  ok_button = gr.Button("OK", elem_id="ok-button")
221
  ok_button.click(fn=start_app, outputs=[intro, app_block])
222
 
223
+ with app_block:
224
 
225
+ gr.HTML("""
226
+ <div id="header">
227
+ <h1>LANGSWITCH</h1>
228
+ <h3>Multilingual Automatic Speech Recognition in noisy environments</h3>
229
+ </div>
230
+ """)
231
+
232
+ with gr.Tab("Transcribe microphone"):
233
+ iface = gr.Interface(
234
+ fn=transcribe_mic,
235
+ inputs=[
236
+ gr.Audio(sources="microphone", type="filepath"),
237
+ gr.Dropdown(label="Language", choices=[("English", "en"),
238
+ ("Euskara", "eu"),
239
+ ("Español", "es"),
240
+ ("Français", "fr"),
241
+ ("Italiano", "it")],
242
+ value="en")
243
+ ],
244
+ outputs=[
245
+ gr.Textbox(label="Transcription", autoscroll=False),
246
+ #gr.Textbox(label="Speaker Identification", autoscroll=False)
247
+ ],
248
+ allow_flagging="never",
249
+ )
250
+
251
+ with gr.Tab("Transcribe local file"):
252
+ iface = gr.Interface(
253
+ fn=transcribe_file,
254
+ inputs=[
255
+ gr.Audio(sources="upload", type="filepath"),
256
+ gr.Dropdown(choices=[("English", "en"),
257
+ ("Euskara", "eu"),
258
+ ("Español", "es"),
259
+ ("Français", "fr"),
260
+ ("Italiano", "it")],
261
+ value="en")
262
+ ],
263
+ outputs=[
264
+ gr.Textbox(label="Transcription", autoscroll=False),
265
+ #gr.Textbox(label="Speaker Identification", autoscroll=False)
266
+ ],
267
+ allow_flagging="never",
268
+ )
269
 
270
 
271
  gr.HTML("""