Spaces:
Sleeping
Sleeping
yunusserhat
commited on
Commit
•
a0d9a4a
1
Parent(s):
30bfe7b
Update GPT4o_class.py
Browse files- GPT4o_class.py +4 -4
GPT4o_class.py
CHANGED
@@ -45,12 +45,12 @@ class GPT4o:
|
|
45 |
self.model.to(self.device)
|
46 |
|
47 |
# Load the embeddings and coordinates from the pickle file
|
48 |
-
with open('
|
49 |
-
self.
|
50 |
-
self.locations = [value['location'] for key, value in self.
|
51 |
|
52 |
# Load the Faiss index
|
53 |
-
index2 = faiss.read_index("
|
54 |
self.gpu_index = index2
|
55 |
|
56 |
def read_image(self, image_path):
|
|
|
45 |
self.model.to(self.device)
|
46 |
|
47 |
# Load the embeddings and coordinates from the pickle file
|
48 |
+
with open('StreetCLIP_5m_merged.pkl', 'rb') as f: # Enter the path to the pickle file
|
49 |
+
self.Embeddings = pickle.load(f)
|
50 |
+
self.locations = [value['location'] for key, value in self.Embeddings.items()]
|
51 |
|
52 |
# Load the Faiss index
|
53 |
+
index2 = faiss.read_index("StreetCLIP_5m_merged.bin") # Enter the path to the Faiss index file
|
54 |
self.gpu_index = index2
|
55 |
|
56 |
def read_image(self, image_path):
|