artificialguybr commited on
Commit
1f202ab
1 Parent(s): 4bbf5e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
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", "Chinese (Simplified)",
19
- "Chinese (Traditional)", "Corsican", "Croatian", "Czech", "Danish", "Dutch", "English", "Esperanto",
20
- "Estonian", "Filipino", "Finnish", "French", "Frisian", "Galician", "Georgian", "German", "Greek",
21
- "Gujarati", "Haitian Creole", "Hausa", "Hawaiian", "Hebrew", "Hindi", "Hmong", "Hungarian", "Icelandic",
22
- "Igbo", "Indonesian", "Irish", "Italian", "Japanese", "Javanese", "Kannada", "Kazakh", "Khmer",
23
- "Korean", "Kurdish (Kurmanji)", "Kyrgyz", "Lao", "Latin", "Latvian", "Lithuanian", "Luxembourgish",
24
- "Macedonian", "Malagasy", "Malay", "Malayalam", "Maltese", "Maori", "Marathi", "Mongolian",
25
- "Myanmar (Burmese)", "Nepali", "Norwegian", "Odia", "Pashto", "Persian", "Polish", "Portuguese",
26
- "Punjabi", "Romanian", "Russian", "Samoan", "Scots Gaelic", "Serbian", "Sesotho", "Shona", "Sindhi",
27
- "Sinhala", "Slovak", "Slovenian", "Somali", "Spanish", "Sundanese", "Swahili", "Swedish", "Tajik",
28
- "Tamil", "Telugu", "Thai", "Turkish", "Ukrainian", "Urdu", "Uyghur", "Uzbek", "Vietnamese", "Welsh",
29
- "Xhosa", "Yiddish", "Yoruba", "Zulu"
30
  ]
31
 
32
  iface = gr.Interface(
33
  fn=interact_with_api,
34
  inputs=[
35
- gr.Video(label="Upload Video or Enter URL"),
36
- gr.Dropdown(choices=language_options, label="Target Language for Translation", value="English"),
37
- gr.Checkbox(label="Translate Video", value=True, info="Check to translate the video to the selected language. Uncheck for transcription only."),
38
  ],
39
  outputs="video",
40
- title="VIDEO TRANSCRIPTION AND TRANSLATION",
41
- description="""This tool was developed by [@artificialguybr](https://twitter.com/artificialguybr) using entirely open-source tools. Special thanks to Hugging Face for the GPU support. Test the [Video Dubbing](https://huggingface.co/spaces/artificialguybr/video-dubbing) space!""",
42
  allow_flagging=False
43
  )
44
 
@@ -46,8 +46,8 @@ with gr.Blocks() as demo:
46
  iface.render()
47
  gr.Markdown("""
48
  **Note:**
49
- - Video limit is 15 minutes. It will do the transcription and translate of subtitles.
50
- - The tool uses open-source models for all models. It's an alpha version.
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()