azamat commited on
Commit
ccce8d5
1 Parent(s): 272de03
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,12 +4,12 @@ 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():
15
  demo = gr.Interface(
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():
15
  demo = gr.Interface(