Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,6 @@ else:
|
|
63 |
# Initialize Mediapipe
|
64 |
mp_face_detection = mp.solutions.face_detection.FaceDetection(model_selection=1, min_detection_confidence=0.5)
|
65 |
|
66 |
-
# --- New: Decision tree function
|
67 |
def recommend_glasses_tree(face_shape):
|
68 |
face_shape = face_shape.lower()
|
69 |
if face_shape == "square":
|
@@ -73,9 +72,9 @@ def recommend_glasses_tree(face_shape):
|
|
73 |
elif face_shape == "oval":
|
74 |
return ["Oval", "Pilot (Aviator)", "Cat Eye", "Round"]
|
75 |
elif face_shape == "heart":
|
76 |
-
return ["
|
77 |
elif face_shape == "oblong":
|
78 |
-
return ["Square", "
|
79 |
else:
|
80 |
return []
|
81 |
|
|
|
63 |
# Initialize Mediapipe
|
64 |
mp_face_detection = mp.solutions.face_detection.FaceDetection(model_selection=1, min_detection_confidence=0.5)
|
65 |
|
|
|
66 |
def recommend_glasses_tree(face_shape):
|
67 |
face_shape = face_shape.lower()
|
68 |
if face_shape == "square":
|
|
|
72 |
elif face_shape == "oval":
|
73 |
return ["Oval", "Pilot (Aviator)", "Cat Eye", "Round"]
|
74 |
elif face_shape == "heart":
|
75 |
+
return ["Oval", "Round", "Cat Eye", "Pilot (Aviator)"]
|
76 |
elif face_shape == "oblong":
|
77 |
+
return ["Square", "Pilot (Aviator)", "Cat Eye"]
|
78 |
else:
|
79 |
return []
|
80 |
|