sudhir2016 commited on
Commit
4acffb0
·
1 Parent(s): 7e24825

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,9 +3,9 @@ import cv2
3
  from deepface import DeepFace
4
  def infer(img):
5
  result=DeepFace.analyze(img,actions=['emotion','gender'])
6
- gen=result[0].get('dominant_emotion')
7
- emo=result[0].get('dominant_gender')
8
- final=('Gender '+gen+' Emotion '+emo)
9
  return final
10
  iface = gradio.Interface(fn=infer, inputs='image', outputs='text')
11
  iface.launch()
 
3
  from deepface import DeepFace
4
  def infer(img):
5
  result=DeepFace.analyze(img,actions=['emotion','gender'])
6
+ emo=result[0].get('dominant_emotion')
7
+ gen=result[0].get('dominant_gender')
8
+ final=('Gender '+gen+', Emotion '+emo)
9
  return final
10
  iface = gradio.Interface(fn=infer, inputs='image', outputs='text')
11
  iface.launch()