ruslanmv commited on
Commit
e510193
·
verified ·
1 Parent(s): 95d3457

Update app.py

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