ruslanmv commited on
Commit
543a1e4
·
verified ·
1 Parent(s): 6d59dce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -27
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.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(["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()