eybro commited on
Commit
d5f4db1
·
verified ·
1 Parent(s): 3ee86f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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: