Spaces:
Running
Running
Commit
·
ba05218
1
Parent(s):
66d1b27
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,13 @@ cfg = OmegaConf.load("config.merged.yml")
|
|
8 |
analyzer = FaceAnalyzer(cfg.analyzer)
|
9 |
|
10 |
|
11 |
-
def inference(
|
12 |
-
analyzer.logger.info(
|
13 |
-
analyzer.logger.info(image.
|
14 |
-
analyzer.logger.info(image.
|
|
|
15 |
response = analyzer.run(
|
16 |
-
path_image=
|
17 |
batch_size=cfg.batch_size,
|
18 |
fix_img_size=cfg.fix_img_size,
|
19 |
return_img_data=cfg.return_img_data,
|
@@ -30,7 +31,7 @@ article = "<p style='text-align: center'><a href='https://github.com/tomas-gajar
|
|
30 |
|
31 |
demo=gr.Interface(
|
32 |
inference,
|
33 |
-
[gr.inputs.Image(label="Input")],
|
34 |
gr.outputs.Image(type="pil", label="Output"),
|
35 |
title=title,
|
36 |
description=description,
|
|
|
8 |
analyzer = FaceAnalyzer(cfg.analyzer)
|
9 |
|
10 |
|
11 |
+
def inference(path_image):
|
12 |
+
analyzer.logger.info(path_image)
|
13 |
+
# analyzer.logger.info(image.shape)
|
14 |
+
# analyzer.logger.info(image.mean())
|
15 |
+
# analyzer.logger.info(image.std())
|
16 |
response = analyzer.run(
|
17 |
+
path_image=path_image,
|
18 |
batch_size=cfg.batch_size,
|
19 |
fix_img_size=cfg.fix_img_size,
|
20 |
return_img_data=cfg.return_img_data,
|
|
|
31 |
|
32 |
demo=gr.Interface(
|
33 |
inference,
|
34 |
+
[gr.inputs.Image(label="Input", type=str)],
|
35 |
gr.outputs.Image(type="pil", label="Output"),
|
36 |
title=title,
|
37 |
description=description,
|