Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -40,9 +40,9 @@ def run(*args):
|
|
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
|
44 |
-
|
45 |
-
supp_id_embeddings = pipeline.get_id_embedding(
|
46 |
id_embeddings = torch.cat(
|
47 |
(id_embeddings, supp_id_embeddings if id_mix else supp_id_embeddings[:, :5]), dim=1
|
48 |
)
|
|
|
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_images is not None:
|
44 |
+
sup_images = resize_numpy_image_long(supp_images, 1024)
|
45 |
+
supp_id_embeddings = pipeline.get_id_embedding(supp_images)
|
46 |
id_embeddings = torch.cat(
|
47 |
(id_embeddings, supp_id_embeddings if id_mix else supp_id_embeddings[:, :5]), dim=1
|
48 |
)
|