Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,6 +66,13 @@ saved_cfg.task.label_dir = data_dir
|
|
66 |
task = tasks.setup_task(saved_cfg.task)
|
67 |
generator = task.build_generator(models, gen_cfg)
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
def detect_landmark(image, detector, predictor):
|
70 |
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
|
71 |
face_locations = detector(gray, 1)
|
|
|
66 |
task = tasks.setup_task(saved_cfg.task)
|
67 |
generator = task.build_generator(models, gen_cfg)
|
68 |
|
69 |
+
def get_youtube(video_url):
|
70 |
+
yt = YouTube(video_url)
|
71 |
+
abs_video_path = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download()
|
72 |
+
print("Success download video")
|
73 |
+
print(abs_video_path)
|
74 |
+
return abs_video_path
|
75 |
+
|
76 |
def detect_landmark(image, detector, predictor):
|
77 |
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
|
78 |
face_locations = detector(gray, 1)
|