Emotion / app.py
sudhir2016's picture
Update app.py
8318e99
raw
history blame
275 Bytes
import gradio
import cv2
from deepface import DeepFace
def infer(img):
result=DeepFace.analyze(img,actions=["emotion"])
result1=result[0].get('dominant_emotion')
return result1
iface = gradio.Interface(fn=infer, inputs='image', outputs='text')
iface.launch()