Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ for r, _, f in os.walk(os.getcwd() + "/images"):
|
|
18 |
|
19 |
source_faces = []
|
20 |
for img in source_imgs:
|
21 |
-
source_faces.append(extract_faces(detector, img)[
|
22 |
source_embeddings = get_embeddings(model, source_faces)
|
23 |
|
24 |
def find_names(image):
|
25 |
-
imgs
|
26 |
embeds = get_embeddings(model, imgs)
|
27 |
d = np.zeros((len(source_embeddings), len(embeds)))
|
28 |
for i, s in enumerate(source_embeddings):
|
|
|
18 |
|
19 |
source_faces = []
|
20 |
for img in source_imgs:
|
21 |
+
source_faces.append(extract_faces(detector, img)[-1])
|
22 |
source_embeddings = get_embeddings(model, source_faces)
|
23 |
|
24 |
def find_names(image):
|
25 |
+
imgs = extract_faces(detector, image)
|
26 |
embeds = get_embeddings(model, imgs)
|
27 |
d = np.zeros((len(source_embeddings), len(embeds)))
|
28 |
for i, s in enumerate(source_embeddings):
|