Spaces:
Running
Running
sashavor
commited on
Commit
•
c45624f
1
Parent(s):
78cdedf
yay!
Browse files
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 |
-
|
29 |
-
|
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 |
|