Init
Browse files- app.py +17 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
+
from deepface import DeepFace
|
4 |
+
|
5 |
+
def analyze(img_path):
|
6 |
+
face_analysis = DeepFace.analyze(img_path = img_path)
|
7 |
+
return pd.DataFrame(face_analysis)
|
8 |
+
|
9 |
+
demo = gr.Interface(
|
10 |
+
analyze,
|
11 |
+
gr.Image(type="filepath", source="webcam",),
|
12 |
+
inputs="image",
|
13 |
+
outputs="dataframe"
|
14 |
+
)
|
15 |
+
|
16 |
+
if __name__ == "__main__":
|
17 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
deepface
|