Spaces:
Runtime error
Runtime error
artificialguybr
commited on
Commit
•
1f202ab
1
Parent(s):
4bbf5e6
Update app.py
Browse files
app.py
CHANGED
@@ -15,30 +15,30 @@ def interact_with_api(video_url, target_language, translate_video):
|
|
15 |
# Lista de opções de idiomas
|
16 |
language_options = [
|
17 |
"Afrikaans", "Albanian", "Amharic", "Arabic", "Armenian", "Azerbaijani", "Basque", "Belarusian",
|
18 |
-
"Bengali", "Bosnian", "Bulgarian", "Catalan", "Cebuano", "Chichewa", "
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"Gujarati", "
|
22 |
-
"Igbo", "
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"
|
27 |
-
"
|
28 |
-
"Tamil", "Telugu", "
|
29 |
-
"Xhosa", "
|
30 |
]
|
31 |
|
32 |
iface = gr.Interface(
|
33 |
fn=interact_with_api,
|
34 |
inputs=[
|
35 |
-
gr.Video(label="
|
36 |
-
gr.Dropdown(choices=language_options, label="
|
37 |
-
gr.Checkbox(label="
|
38 |
],
|
39 |
outputs="video",
|
40 |
-
title="
|
41 |
-
description="""
|
42 |
allow_flagging=False
|
43 |
)
|
44 |
|
@@ -46,8 +46,8 @@ with gr.Blocks() as demo:
|
|
46 |
iface.render()
|
47 |
gr.Markdown("""
|
48 |
**Note:**
|
49 |
-
-
|
50 |
-
-
|
51 |
""")
|
52 |
demo.queue
|
53 |
demo.launch()
|
|
|
15 |
# Lista de opções de idiomas
|
16 |
language_options = [
|
17 |
"Afrikaans", "Albanian", "Amharic", "Arabic", "Armenian", "Azerbaijani", "Basque", "Belarusian",
|
18 |
+
"Bengali", "Bosnian", "Bulgarian", "Catalan", "Cebuano", "Chichewa", "Chino (Simplificado)",
|
19 |
+
"Chino (Tradicional)", "Corso", "Croata", "Checo", "Danés", "Holandés", "Inglés", "Esperanto",
|
20 |
+
"Estonio", "Filipino", "Finlandés", "Francés", "Frisón", "Gallego", "Georgiano", "Alemán", "Griego",
|
21 |
+
"Gujarati", "Criollo haitiano", "Hausa", "Hawaiano", "Hebreo", "Hindi", "Hmong", "Húngaro", "Islandés",
|
22 |
+
"Igbo", "Indonesio", "Irlandés", "Italiano", "Japonés", "Javanés", "Kannada", "Kazajo", "Jemer",
|
23 |
+
"Coreano", "Kurdo (Kurmanji)", "Kirguís", "Laosiano", "Latín", "Letón", "Lituano", "Luxemburgués",
|
24 |
+
"Macedonio", "Malgache", "Malayo", "Malayalam", "Maltés", "Maorí", "Maratí", "Mongol",
|
25 |
+
"Birmano (Myanmar)", "Nepalí", "Noruego", "Oriya", "Pastún", "Persa", "Polaco", "Portugués",
|
26 |
+
"Punyabí", "Rumano", "Ruso", "Samoano", "Gaélico escocés", "Serbio", "Sesotho", "Shona", "Sindhi",
|
27 |
+
"Cingalés", "Eslovaco", "Esloveno", "Somalí", "Español", "Sundanés", "Suajili", "Sueco", "Tayiko",
|
28 |
+
"Tamil", "Telugu", "Tailandés", "Turco", "Ucraniano", "Urdu", "Uigur", "Uzbeko", "Vietnamita", "Galés",
|
29 |
+
"Xhosa", "Yidis", "Yoruba", "Zulú"
|
30 |
]
|
31 |
|
32 |
iface = gr.Interface(
|
33 |
fn=interact_with_api,
|
34 |
inputs=[
|
35 |
+
gr.Video(label="Subida de video o URL"),
|
36 |
+
gr.Dropdown(choices=language_options, label="Idioma de destino para la traducción.", value="English"),
|
37 |
+
gr.Checkbox(label="Traducir video.", value=True, info="Marcar para traducir el video al idioma seleccionado. Desmarcar para solo la transcripción."),
|
38 |
],
|
39 |
outputs="video",
|
40 |
+
title="Transcripción y Traducción de Video",
|
41 |
+
description="""Esta herramienta, creada por [@artificialguybr](https://twitter.com/artificialguybr), utiliza herramientas completamente de código abierto. Agradecimiento especial a Hugging Face por el soporte de GPU. ¡Prueba el espacio de [ Doblaje de Video](https://huggingface.co/spaces/artificialguybr/video-dubbing)! Esta plataforma permite transcribir y traducir videos en múltiples idiomas, ofreciendo una solución accesible y eficiente para la traducción y transcripción de contenido audiovisual.""",
|
42 |
allow_flagging=False
|
43 |
)
|
44 |
|
|
|
46 |
iface.render()
|
47 |
gr.Markdown("""
|
48 |
**Note:**
|
49 |
+
- Límite de video de 15 minutos. Realiza la transcripción y traducción de subtítulos.
|
50 |
+
- La herramienta utiliza modelos de código abierto para todas las funcionalidades. Es una versión alfa.
|
51 |
""")
|
52 |
demo.queue
|
53 |
demo.launch()
|