Skip to content

Commit

Permalink
Updated main_face.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dishahimani authored Nov 16, 2024
1 parent 8134ab7 commit 23245a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/main_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def play_first_song(final_emotion):
match = re.search(r'/watch\?v=([^\"]+)', html_content)
if match:
video_id = match.group(1)
video_url = f"https://www.youtube.com/watch?v={video_id}"
#video_url = f"https://www.youtube.com/watch?v={video_id}"
video_url = f"https://www.youtube.com/watch?v={video_id.encode('utf-8').decode('unicode_escape')}"
webbrowser.open(video_url)

# Load the pre-trained facial expression recognition model
Expand Down

0 comments on commit 23245a6

Please sign in to comment.