Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def analyze_image(image):
|
|
| 16 |
"Giới tính": "Nam" if info["dominant_gender"] == "Man" else "Nữ",
|
| 17 |
"Cảm xúc chính": info["dominant_emotion"],
|
| 18 |
"Chủng tộc": info["dominant_race"]
|
| 19 |
-
|
| 20 |
}
|
| 21 |
return json.dumps(output, ensure_ascii=False, indent=2)
|
| 22 |
except Exception as e:
|
|
|
|
| 16 |
"Giới tính": "Nam" if info["dominant_gender"] == "Man" else "Nữ",
|
| 17 |
"Cảm xúc chính": info["dominant_emotion"],
|
| 18 |
"Chủng tộc": info["dominant_race"]
|
| 19 |
+
"Độ tin cậy": round(info["face_confidence"], 2) # bỏ nếu không muốn hiển thị
|
| 20 |
}
|
| 21 |
return json.dumps(output, ensure_ascii=False, indent=2)
|
| 22 |
except Exception as e:
|