Spaces:
Build error
Build error
Commit
·
b2aa59f
1
Parent(s):
45b74cd
app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ with open(emb_filename, 'rb') as fIn:
|
|
79 |
|
80 |
def display_matches(similarity):
|
81 |
best_matched_images = []
|
82 |
-
for best_img in torch.topk(similarity, 4
|
83 |
img = Image.open(os.path.join('./photos', img_names[best_img]))
|
84 |
best_matched_images.append(img)
|
85 |
return best_matched_images
|
|
|
79 |
|
80 |
def display_matches(similarity):
|
81 |
best_matched_images = []
|
82 |
+
for best_img in torch.topk(similarity, 4).indices:
|
83 |
img = Image.open(os.path.join('./photos', img_names[best_img]))
|
84 |
best_matched_images.append(img)
|
85 |
return best_matched_images
|