azamat commited on
Commit
0bb1252
1 Parent(s): 52d594d

Beautify output

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -4,7 +4,12 @@ from deepface import DeepFace
4
 
5
  def analyze(img_path):
6
  face_analysis = DeepFace.analyze(img_path = img_path)
7
- return pd.DataFrame(face_analysis)
 
 
 
 
 
8
 
9
  def main():
10
  demo = gr.Interface(
 
4
 
5
  def analyze(img_path):
6
  face_analysis = DeepFace.analyze(img_path = img_path)
7
+ return pd.DataFrame({
8
+ 'gender': face_analysis['gender'],
9
+ 'age': face_analysis['age'],
10
+ 'dominant_emotion': face_analysis['dominant_emotion'],
11
+ 'dominant_race': face_analysis['dominant_race']
12
+ })
13
 
14
  def main():
15
  demo = gr.Interface(