Refactor
Browse files
app.py
CHANGED
@@ -6,11 +6,13 @@ def analyze(img_path):
|
|
6 |
face_analysis = DeepFace.analyze(img_path = img_path)
|
7 |
return pd.DataFrame(face_analysis)
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
if __name__ == "__main__":
|
16 |
-
|
|
|
6 |
face_analysis = DeepFace.analyze(img_path = img_path)
|
7 |
return pd.DataFrame(face_analysis)
|
8 |
|
9 |
+
def main():
|
10 |
+
demo = gr.Interface(
|
11 |
+
fn=analyze,
|
12 |
+
inputs=gr.Image(type="filepath", source="webcam"),
|
13 |
+
outputs="dataframe"
|
14 |
+
)
|
15 |
+
demo.launch()
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
+
main()
|