Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def estimate_spo2_rr(heart_rate):
|
|
31 |
# Main analysis function
|
32 |
def analyze_face(image):
|
33 |
if image is None:
|
34 |
-
return "No image provided", None
|
35 |
|
36 |
frame_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
37 |
result = face_mesh.process(frame_rgb)
|
@@ -51,7 +51,7 @@ def analyze_face(image):
|
|
51 |
}
|
52 |
return report, frame_rgb
|
53 |
else:
|
54 |
-
return "Face not detected", None
|
55 |
|
56 |
# Launch UI
|
57 |
demo = gr.Interface(
|
|
|
31 |
# Main analysis function
|
32 |
def analyze_face(image):
|
33 |
if image is None:
|
34 |
+
return {"error": "No image provided"}, None
|
35 |
|
36 |
frame_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
37 |
result = face_mesh.process(frame_rgb)
|
|
|
51 |
}
|
52 |
return report, frame_rgb
|
53 |
else:
|
54 |
+
return {"error": "Face not detected"}, None
|
55 |
|
56 |
# Launch UI
|
57 |
demo = gr.Interface(
|