Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
224 |
|
225 |
-
|
226 |
-
<div id="header">
|
227 |
-
|
228 |
-
|
229 |
-
</div>
|
230 |
-
""")
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
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("""
|