Spaces:
Running
Running
update faiss index
Browse files- app.py +2 -2
- images.json +0 -0
- xbgp-faiss-map.json +0 -0
- vector.index → xbgp-faiss.index +2 -2
app.py
CHANGED
@@ -22,7 +22,7 @@ def process_image(image):
|
|
22 |
# and then formatting the output (extracted features).
|
23 |
|
24 |
# Load the index
|
25 |
-
with open("
|
26 |
images = json.load(f)
|
27 |
|
28 |
# Convert to RGB if it isn't already
|
@@ -56,7 +56,7 @@ def process_image(image):
|
|
56 |
faiss.normalize_L2(vector)
|
57 |
|
58 |
# Read the index file and perform search of top 50 images
|
59 |
-
index = faiss.read_index("
|
60 |
distances, indices = index.search(vector, 50)
|
61 |
|
62 |
matches = []
|
|
|
22 |
# and then formatting the output (extracted features).
|
23 |
|
24 |
# Load the index
|
25 |
+
with open("xbgp-faiss-map.json", "r") as f:
|
26 |
images = json.load(f)
|
27 |
|
28 |
# Convert to RGB if it isn't already
|
|
|
56 |
faiss.normalize_L2(vector)
|
57 |
|
58 |
# Read the index file and perform search of top 50 images
|
59 |
+
index = faiss.read_index("xbgp-faiss.index")
|
60 |
distances, indices = index.search(vector, 50)
|
61 |
|
62 |
matches = []
|
images.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
xbgp-faiss-map.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
vector.index → xbgp-faiss.index
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:86de978c71ef9e2ad4df903c2eb78bd5c1eb55667b5b34f51c8d668a7aad8f2a
|
3 |
+
size 100042797
|