Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -39,13 +39,13 @@ def run(*args):
|
|
39 |
if id_image is not None:
|
40 |
id_image = resize_numpy_image_long(id_image, 1024)
|
41 |
id_embeddings = pipeline.get_id_embedding(id_image)
|
42 |
-
for supp_id_image in supp_images:
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
else:
|
50 |
id_embeddings = None
|
51 |
|
|
|
39 |
if id_image is not None:
|
40 |
id_image = resize_numpy_image_long(id_image, 1024)
|
41 |
id_embeddings = pipeline.get_id_embedding(id_image)
|
42 |
+
# for supp_id_image in supp_images:
|
43 |
+
if supp_id_image is not None:
|
44 |
+
supp_id_image = resize_numpy_image_long(supp_id_image, 1024)
|
45 |
+
supp_id_embeddings = pipeline.get_id_embedding(supp_id_image)
|
46 |
+
id_embeddings = torch.cat(
|
47 |
+
(id_embeddings, supp_id_embeddings if id_mix else supp_id_embeddings[:, :5]), dim=1
|
48 |
+
)
|
49 |
else:
|
50 |
id_embeddings = None
|
51 |
|