Spaces:
Runtime error
Runtime error
fix: set top k as 1
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def augment(img, transforms=transforms) -> torch.Tensor:
|
|
29 |
return transforms(img).unsqueeze(0)
|
30 |
|
31 |
|
32 |
-
def search_index(input_image, k
|
33 |
with torch.no_grad():
|
34 |
embedding = model(augment(input_image))
|
35 |
index = read_index("./bin/dino.index")
|
|
|
29 |
return transforms(img).unsqueeze(0)
|
30 |
|
31 |
|
32 |
+
def search_index(input_image, k = 1):
|
33 |
with torch.no_grad():
|
34 |
embedding = model(augment(input_image))
|
35 |
index = read_index("./bin/dino.index")
|