File size: 370 Bytes
ef464de |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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()
|