Spaces:
Runtime error
Runtime error
Commit
·
7e24825
1
Parent(s):
8318e99
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,11 @@ import gradio
|
|
2 |
import cv2
|
3 |
from deepface import DeepFace
|
4 |
def infer(img):
|
5 |
-
result=DeepFace.analyze(img,actions=[
|
6 |
-
|
7 |
-
|
|
|
|
|
8 |
iface = gradio.Interface(fn=infer, inputs='image', outputs='text')
|
9 |
iface.launch()
|
10 |
|
|
|
2 |
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()
|
12 |
|