Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,6 +37,7 @@ def find_nearest_neighbors(encoded_images, input_image, top_n=5):
|
|
| 37 |
return [(index, distances[index]) for index in nearest_neighbors]
|
| 38 |
|
| 39 |
def get_image(index):
|
|
|
|
| 40 |
if index < split:
|
| 41 |
return dataset["train"][index]
|
| 42 |
else:
|
|
|
|
| 37 |
return [(index, distances[index]) for index in nearest_neighbors]
|
| 38 |
|
| 39 |
def get_image(index):
|
| 40 |
+
split = len(dataset["train"])
|
| 41 |
if index < split:
|
| 42 |
return dataset["train"][index]
|
| 43 |
else:
|