sashavor commited on
Commit
c45624f
1 Parent(s): 78cdedf
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -25,11 +25,8 @@ def query(image, top_k):
25
  model_output = model(**inputs)
26
  embedding = model_output.pooler_output.detach()
27
  results = index.query(embedding)
28
- images=[]
29
- for i in results[0].tolist():
30
- print(i)
31
- print(type(i))
32
- images.append(ds.select(i)["image"])
33
  return images
34
 
35
 
 
25
  model_output = model(**inputs)
26
  embedding = model_output.pooler_output.detach()
27
  results = index.query(embedding)
28
+ inx = results[0][0].tolist()
29
+ images = ds.select(inx)["image"]
 
 
 
30
  return images
31
 
32