Vision-CAIR commited on
Commit
e6ca9fc
1 Parent(s): 3212f0d

use_auth=True

Browse files
Files changed (1) hide show
  1. minigpt4_video_demo.py +2 -2
minigpt4_video_demo.py CHANGED
@@ -207,7 +207,7 @@ def get_video_url(url,has_subtitles):
207
  # get video id from url
208
  video_id=url.split('v=')[-1].split('&')[0]
209
  # Create a YouTube object
210
- youtube = YouTube(url)
211
  # Get the best available video stream
212
  video_stream = youtube.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first()
213
  # if has_subtitles:
@@ -359,7 +359,7 @@ with gr.Blocks(title="MiniGPT4-video 🎞️🍿",css=text_css ) as demo :
359
 
360
 
361
  if __name__ == "__main__":
362
- demo.queue(max_size=10).launch(share=False,show_error=True, show_api=False)
363
 
364
 
365
 
 
207
  # get video id from url
208
  video_id=url.split('v=')[-1].split('&')[0]
209
  # Create a YouTube object
210
+ youtube = YouTube(url,use_oauth=True)
211
  # Get the best available video stream
212
  video_stream = youtube.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first()
213
  # if has_subtitles:
 
359
 
360
 
361
  if __name__ == "__main__":
362
+ demo.queue(max_size=10).launch(share=True,show_error=True, show_api=False)
363
 
364
 
365