emoface / app.py
azamat's picture
Init
ef464de
raw
history blame
370 Bytes
import gradio as gr
import pandas as pd
from deepface import DeepFace
def analyze(img_path):
face_analysis = DeepFace.analyze(img_path = img_path)
return pd.DataFrame(face_analysis)
demo = gr.Interface(
analyze,
gr.Image(type="filepath", source="webcam",),
inputs="image",
outputs="dataframe"
)
if __name__ == "__main__":
demo.launch()