Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def load_model():
|
|
19 |
options.intra_op_num_threads = 8
|
20 |
options.inter_op_num_threads = 8
|
21 |
session = ort.InferenceSession(
|
22 |
-
path, sess_options=options, providers=["CPUExecutionProvider"
|
23 |
)
|
24 |
model = insightface.model_zoo.retinaface.RetinaFace(model_file=path, session=session)
|
25 |
return model
|
@@ -58,7 +58,7 @@ examples = sorted(pathlib.Path("images").glob("*.jpg"))
|
|
58 |
demo = gr.Interface(
|
59 |
fn=detect,
|
60 |
inputs=gr.Image(label="Input", type="numpy"),
|
61 |
-
outputs=gr.
|
62 |
examples=examples,
|
63 |
examples_per_page=30,
|
64 |
title=TITLE,
|
|
|
19 |
options.intra_op_num_threads = 8
|
20 |
options.inter_op_num_threads = 8
|
21 |
session = ort.InferenceSession(
|
22 |
+
path, sess_options=options, providers=["CPUExecutionProvider"]
|
23 |
)
|
24 |
model = insightface.model_zoo.retinaface.RetinaFace(model_file=path, session=session)
|
25 |
return model
|
|
|
58 |
demo = gr.Interface(
|
59 |
fn=detect,
|
60 |
inputs=gr.Image(label="Input", type="numpy"),
|
61 |
+
outputs=gr.Gallery(label="Detected Persons"), # Display multiple images in a gallery
|
62 |
examples=examples,
|
63 |
examples_per_page=30,
|
64 |
title=TITLE,
|