tomas-gajarsky commited on
Commit
b723189
1 Parent(s): 4e60bca

Rename main.py to app.py

Browse files
Files changed (1) hide show
  1. main.py → app.py +18 -13
main.py → app.py RENAMED
@@ -21,16 +21,21 @@ def inference(path_image):
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
- 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=[["./data/input/test.jpg"], ["./data/input/test2.jpg"]],
36
- ).launch(debug=True)
 
 
 
 
 
 
21
  return pil_image
22
 
23
 
24
+ def main():
25
+ title = "facetorch"
26
+ 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."
27
+ article = "<p style='text-align: center'><a href='https://github.com/tomas-gajarsky/facetorch' target='_blank'>Github Repo</a></p>"
28
+
29
+ gr.Interface(
30
+ inference,
31
+ [gr.inputs.Image(label="Input")],
32
+ gr.outputs.Image(type="pil", label="Output"),
33
+ title=title,
34
+ description=description,
35
+ article=article,
36
+ examples=[["./data/input/test.jpg"], ["./data/input/test2.jpg"]],
37
+ ).launch(debug=True)
38
+
39
+
40
+ if __name__ == "__main__":
41
+ main()