Sayiqa commited on
Commit
c421f22
·
verified ·
1 Parent(s): 3850b64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -391,6 +391,10 @@ def process_youtube_video(url="", keywords=""):
391
  if not video_id:
392
  return thumbnail, "Invalid YouTube URL", sentiment_label, recommendations
393
 
 
 
 
 
394
  # Set thumbnail
395
  thumbnail = f"https://img.youtube.com/vi/{video_id}/maxresdefault.jpg"
396
 
 
391
  if not video_id:
392
  return thumbnail, "Invalid YouTube URL", sentiment_label, recommendations
393
 
394
+ video_id = extract_video_id(url)
395
+ if not video_id:
396
+ return thumbnail, "Invalid YouTube URL", sentiment_label, recommendations
397
+
398
  # Set thumbnail
399
  thumbnail = f"https://img.youtube.com/vi/{video_id}/maxresdefault.jpg"
400