Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,16 +13,14 @@ from geopandas import GeoDataFrame
|
|
13 |
model = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14').to("cuda")
|
14 |
model.eval()
|
15 |
|
16 |
-
metadata = pd.read_csv("
|
17 |
metadata.path = metadata.path.apply(lambda x: x.split("/")[-1])
|
18 |
|
19 |
-
PATH = "data/streetview_v3/images/"
|
20 |
-
PATH_TEST = "data/test-competition/images/images/"
|
21 |
|
22 |
-
embeddings = np.load("
|
23 |
-
test_embeddings = np.load("
|
24 |
-
files = open("
|
25 |
-
test_files = open("
|
26 |
print(embeddings.shape, test_embeddings.shape, len(files), len(test_files))
|
27 |
|
28 |
knn = NearestNeighbors(n_neighbors=50, algorithm='kd_tree', n_jobs=8)
|
|
|
13 |
model = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14').to("cuda")
|
14 |
model.eval()
|
15 |
|
16 |
+
metadata = pd.read_csv("metadatav3.csv")
|
17 |
metadata.path = metadata.path.apply(lambda x: x.split("/")[-1])
|
18 |
|
|
|
|
|
19 |
|
20 |
+
embeddings = np.load("embeddings.npy")
|
21 |
+
test_embeddings = np.load("test_embeddings.npy")
|
22 |
+
files = open("files.txt").read().split("\n")
|
23 |
+
test_files = open("test_files.txt").read().split("\n")
|
24 |
print(embeddings.shape, test_embeddings.shape, len(files), len(test_files))
|
25 |
|
26 |
knn = NearestNeighbors(n_neighbors=50, algorithm='kd_tree', n_jobs=8)
|