Update app.py
Browse files
app.py
CHANGED
@@ -319,31 +319,28 @@ def video_to_translate(url,initial_language,final_language):
|
|
319 |
|
320 |
return new_video
|
321 |
|
322 |
-
initial_language = gr.
|
323 |
-
final_language = gr.
|
324 |
-
url =gr.
|
325 |
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
]
|
349 |
-
).launch()
|
|
|
319 |
|
320 |
return new_video
|
321 |
|
322 |
+
initial_language = gr.Dropdown(["English", "Italian", "Japanese", "Russian", "Spanish", "German"], label="Initial Language")
|
323 |
+
final_language = gr.Dropdown(["Russian", "Italian", "Spanish", "German", "English", "Japanese"], label="Final Language")
|
324 |
+
url = gr.Textbox(label="Enter the YouTube URL below:")
|
325 |
|
326 |
+
gr.Interface(
|
327 |
+
fn=video_to_translate,
|
328 |
+
inputs=[url, initial_language, final_language],
|
329 |
+
outputs='video',
|
330 |
+
verbose=True,
|
331 |
+
title='Video Youtube Translator',
|
332 |
+
description='A simple application that translates Youtube small videos from English, Italian, Japanese, Russian, Spanish, and German to Italian, Spanish, Russian, English, and Japanese. Wait one minute to process.',
|
333 |
+
article='''<div>
|
334 |
+
<p style="text-align: center">All you need to do is paste the Youtube link and hit submit, then wait for compiling. After that, click on Play/Pause for listening to the video. The video is saved in an mp4 format.
|
335 |
+
The video length limit is 10 minutes. For more information, visit <a href="https://ruslanmv.com/">ruslanmv.com</a>
|
336 |
+
</p>
|
337 |
+
</div>''',
|
338 |
+
examples=[
|
339 |
+
["https://www.youtube.com/watch?v=uLVRZE8OAI4", "English", "Spanish"],
|
340 |
+
["https://www.youtube.com/watch?v=fkGCLIQx1MI", "English", "Russian"],
|
341 |
+
["https://www.youtube.com/watch?v=6Q6hFtitthQ", "Italian", "English"],
|
342 |
+
["https://www.youtube.com/watch?v=s5XvjAC7ai8", "Russian", "English"],
|
343 |
+
["https://www.youtube.com/watch?v=qzzweIQoIOU", "Japanese", "English"],
|
344 |
+
["https://www.youtube.com/watch?v=nOGZvu6tJFE", "German", "Spanish"]
|
345 |
+
]
|
346 |
+
).launch()
|
|
|
|
|
|