Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,9 +34,6 @@ def process_image(input_image: np.ndarray) -> np.ndarray:
|
|
34 |
# Detect faces
|
35 |
with torch.inference_mode():
|
36 |
faces = face_detector(image)
|
37 |
-
|
38 |
-
if len(faces['bbox']) == 0:
|
39 |
-
raise ValueError("No faces detected in the image!")
|
40 |
|
41 |
# Initialize face parser
|
42 |
face_parser = facer.face_parser('farl/lapa/448', device=device)
|
|
|
34 |
# Detect faces
|
35 |
with torch.inference_mode():
|
36 |
faces = face_detector(image)
|
|
|
|
|
|
|
37 |
|
38 |
# Initialize face parser
|
39 |
face_parser = facer.face_parser('farl/lapa/448', device=device)
|