Fix bug
Browse files
app.py
CHANGED
@@ -3,12 +3,12 @@ import pandas as pd
|
|
3 |
from deepface import DeepFace
|
4 |
|
5 |
def analyze(img_path):
|
6 |
-
face_analysis = DeepFace.analyze(img_path = img_path)
|
7 |
return pd.DataFrame({
|
8 |
-
'gender': face_analysis
|
9 |
-
'age': face_analysis
|
10 |
-
'dominant_emotion': face_analysis
|
11 |
-
'dominant_race': face_analysis
|
12 |
})
|
13 |
|
14 |
def main():
|
|
|
3 |
from deepface import DeepFace
|
4 |
|
5 |
def analyze(img_path):
|
6 |
+
face_analysis = DeepFace.analyze(img_path = img_path, enforce_detection=False)
|
7 |
return pd.DataFrame({
|
8 |
+
'gender': face_analysis.get('gender', None),
|
9 |
+
'age': face_analysis.get('age', None),
|
10 |
+
'dominant_emotion': face_analysis.get('dominant_emotion', None),
|
11 |
+
'dominant_race': face_analysis.get('dominant_race', None)
|
12 |
})
|
13 |
|
14 |
def main():
|