Spaces:
Runtime error
Runtime error
newest releast doesn't support tabs yet
Browse files- app.py +3 -11
- requirements.txt +3 -1
app.py
CHANGED
@@ -200,12 +200,13 @@ def iface(ui_language):
|
|
200 |
inputs=[
|
201 |
gr.inputs.Radio(choices=("chatino", "mixteco", "totonaco"), default="mixteco", label=UI_STRINGS["labels"]["target"][ui_language]),
|
202 |
gr.inputs.Audio(type="numpy", label=UI_STRINGS["labels"]["input"][ui_language], source="microphone", optional=False),
|
|
|
203 |
],
|
204 |
outputs=gr.outputs.Textbox(label=UI_STRINGS["labels"]["output"][ui_language]),
|
205 |
title=UI_STRINGS["title"][ui_language],
|
206 |
theme="huggingface",
|
207 |
description=UI_STRINGS["description"][ui_language],
|
208 |
-
examples=[["mixteco", "ejemplos/espanol1.wav"],
|
209 |
["mixteco", "ejemplos/espanol2-Yolox_BotFl_CTB501-FEF537-EGS503_40202-Acanthaceae-Ruellia_2017-01-05-h.wav"],
|
210 |
["mixteco", "ejemplos/mixteco1-Yolox_BotFl_CTB501-FEF537-EGS503_40202-Acanthaceae-Ruellia_2017-01-05-h.wav"],
|
211 |
["mixteco", "ejemplos/mixteco2-Yolox_BotFl_CTB501-FEF537-EGS503_40202-Acanthaceae-Ruellia_2017-01-05-h.wav"],
|
@@ -215,14 +216,5 @@ def iface(ui_language):
|
|
215 |
)
|
216 |
|
217 |
es_iface = iface('es')
|
218 |
-
en_iface = iface('en')
|
219 |
|
220 |
-
|
221 |
-
gr.Markdown('Select language of interface | Escoja lengua de la interfaz')
|
222 |
-
with gr.Tabs():
|
223 |
-
with gr.TabItem("Español"):
|
224 |
-
es_iface.render()
|
225 |
-
with gr.TabItem("English"):
|
226 |
-
en_iface.render()
|
227 |
-
|
228 |
-
demo.launch()
|
|
|
200 |
inputs=[
|
201 |
gr.inputs.Radio(choices=("chatino", "mixteco", "totonaco"), default="mixteco", label=UI_STRINGS["labels"]["target"][ui_language]),
|
202 |
gr.inputs.Audio(type="numpy", label=UI_STRINGS["labels"]["input"][ui_language], source="microphone", optional=False),
|
203 |
+
gr.inputs.State()
|
204 |
],
|
205 |
outputs=gr.outputs.Textbox(label=UI_STRINGS["labels"]["output"][ui_language]),
|
206 |
title=UI_STRINGS["title"][ui_language],
|
207 |
theme="huggingface",
|
208 |
description=UI_STRINGS["description"][ui_language],
|
209 |
+
examples=[["mixteco", "ejemplos/espanol1.wav", "español: "],
|
210 |
["mixteco", "ejemplos/espanol2-Yolox_BotFl_CTB501-FEF537-EGS503_40202-Acanthaceae-Ruellia_2017-01-05-h.wav"],
|
211 |
["mixteco", "ejemplos/mixteco1-Yolox_BotFl_CTB501-FEF537-EGS503_40202-Acanthaceae-Ruellia_2017-01-05-h.wav"],
|
212 |
["mixteco", "ejemplos/mixteco2-Yolox_BotFl_CTB501-FEF537-EGS503_40202-Acanthaceae-Ruellia_2017-01-05-h.wav"],
|
|
|
216 |
)
|
217 |
|
218 |
es_iface = iface('es')
|
|
|
219 |
|
220 |
+
es_iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -4,4 +4,6 @@ pydub==0.25.1
|
|
4 |
speechbrain==0.5.10
|
5 |
torchaudio
|
6 |
transformers
|
7 |
-
librosa
|
|
|
|
|
|
4 |
speechbrain==0.5.10
|
5 |
torchaudio
|
6 |
transformers
|
7 |
+
librosa
|
8 |
+
pyctcdecode
|
9 |
+
kenlm
|