Spaces:
Running
on
L40S
Running
on
L40S
Update webgui.py
Browse files
webgui.py
CHANGED
@@ -202,6 +202,7 @@ def process_video(uploaded_img, uploaded_audio, width, height, length, seed, fac
|
|
202 |
face_mask[:, :] = 255
|
203 |
face_img = cv2.resize(face_img, (width, height))
|
204 |
face_mask = cv2.resize(face_mask, (width, height))
|
|
|
205 |
else:
|
206 |
print("SELECT_BBOX IS NOT NONE")
|
207 |
xyxy = select_bbox[:4]
|
|
|
202 |
face_mask[:, :] = 255
|
203 |
face_img = cv2.resize(face_img, (width, height))
|
204 |
face_mask = cv2.resize(face_mask, (width, height))
|
205 |
+
raise gr.Error("Face Detector could not detect a face in your image. Try with a 512 squared image where the face is clearly visible.")
|
206 |
else:
|
207 |
print("SELECT_BBOX IS NOT NONE")
|
208 |
xyxy = select_bbox[:4]
|