Spaces:
Runtime error
Runtime error
Commit
·
4acffb0
1
Parent(s):
7e24825
Update app.py
Browse files
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 |
-
|
7 |
-
|
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()
|