Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
sudhir2016
/
Emotion
like
1
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
ff5b243
Emotion
/
app.py
sudhir2016
Update app.py
ff5b243
over 2 years ago
raw
Copy download link
history
blame
Safe
228 Bytes
import
gradio
import
cv2
from
deepface
import
DeepFace
def
infer
(
img
):
result=DeepFace.analyze(img,actions=[
"emotion"
])
return
result
iface = gradio.Interface(fn=infer, inputs=
'image'
, outputs=
'text'
)
iface.launch()