emoface / app.py
azamat's picture
Refactor
52d594d
raw
history blame
400 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)
def main():
demo = gr.Interface(
fn=analyze,
inputs=gr.Image(type="filepath", source="webcam"),
outputs="dataframe"
)
demo.launch()
if __name__ == "__main__":
main()