Spaces:
Running
Running
tomas-gajarsky
commited on
Commit
·
b5a31f2
1
Parent(s):
364060d
Update app.py
Browse files
app.py
CHANGED
@@ -21,21 +21,17 @@ def inference(path_image):
|
|
21 |
return pil_image
|
22 |
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
if __name__ == "__main__":
|
41 |
-
main()
|
|
|
21 |
return pil_image
|
22 |
|
23 |
|
24 |
+
title = "facetorch"
|
25 |
+
description = "Demo for facetorch, a Python library that can detect faces and analyze facial features using deep neural networks. The goal is to gather open sourced face analysis models from the community and optimize them for performance using TorchScrip. Try selecting one of the example images or upload your own."
|
26 |
+
article = "<p style='text-align: center'><a href='https://github.com/tomas-gajarsky/facetorch' target='_blank'>Github Repo</a></p>"
|
27 |
+
|
28 |
+
demo=gr.Interface(
|
29 |
+
inference,
|
30 |
+
[gr.inputs.Image(label="Input")],
|
31 |
+
gr.outputs.Image(type="pil", label="Output"),
|
32 |
+
title=title,
|
33 |
+
description=description,
|
34 |
+
article=article,
|
35 |
+
examples=[["./test.jpg"], ["./test2.jpg"], ["./test3.jpg"], ["./test4.jpg"]],
|
36 |
+
)
|
37 |
+
demo.launch(debug=True)
|
|
|
|
|
|
|
|