Maximofn commited on
Commit
5fa8fba
1 Parent(s): 77d65f3

Add pytube again into requirements.txt to get the thumbnail of the youtube video

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. requirements.txt +1 -1
app.py CHANGED
@@ -443,6 +443,7 @@ def subtify():
443
  with gr.Blocks() as demo:
444
  # Layout
445
  gr.Markdown("""# Subtify""")
 
446
  gr.Markdown(f"Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}")
447
  with gr.Row(variant="panel"):
448
  url_textbox = gr.Textbox(placeholder="Add video URL here", label="Video URL", elem_id="video_url", scale=1, interactive=True)
@@ -500,10 +501,9 @@ def subtify():
500
  ]
501
  )
502
  subtify_button.click(fn=get_audio_and_video_from_video, inputs=[url_textbox, stream_page], outputs=[original_audio, original_audio_path, original_video_path])
503
- original_audio.change(fn=trascribe_audio, inputs=[original_audio_path, source_languaje], outputs=[original_audio_transcribed, original_audio_transcribed_path])
504
- original_audio_transcribed.change(fn=translate_transcription, inputs=[original_audio_transcribed_path, source_languaje, target_languaje], outputs=[original_audio_translated, original_audio_translated_path])
505
- original_audio_translated.change(fn=add_translated_subtitles_to_video, inputs=[original_video_path, original_audio_path, original_audio_translated_path], outputs=subtitled_video)
506
-
507
 
508
  demo.launch()
509
 
 
443
  with gr.Blocks() as demo:
444
  # Layout
445
  gr.Markdown("""# Subtify""")
446
+ gr.Markdown("""download""")
447
  gr.Markdown(f"Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}")
448
  with gr.Row(variant="panel"):
449
  url_textbox = gr.Textbox(placeholder="Add video URL here", label="Video URL", elem_id="video_url", scale=1, interactive=True)
 
501
  ]
502
  )
503
  subtify_button.click(fn=get_audio_and_video_from_video, inputs=[url_textbox, stream_page], outputs=[original_audio, original_audio_path, original_video_path])
504
+ # original_audio.change(fn=trascribe_audio, inputs=[original_audio_path, source_languaje], outputs=[original_audio_transcribed, original_audio_transcribed_path])
505
+ # original_audio_transcribed.change(fn=translate_transcription, inputs=[original_audio_transcribed_path, source_languaje, target_languaje], outputs=[original_audio_translated, original_audio_translated_path])
506
+ # original_audio_translated.change(fn=add_translated_subtitles_to_video, inputs=[original_video_path, original_audio_path, original_audio_translated_path], outputs=subtitled_video)
 
507
 
508
  demo.launch()
509
 
requirements.txt CHANGED
@@ -2,7 +2,7 @@
2
  gradio
3
 
4
  # Download youtube and twitch videos
5
- # pytube
6
  yt-dlp
7
  twitch-dl
8
 
 
2
  gradio
3
 
4
  # Download youtube and twitch videos
5
+ pytube
6
  yt-dlp
7
  twitch-dl
8