Commit ddfc0428 authored by kurumuz's avatar kurumuz

safe

parent 9e1603d8
......@@ -680,9 +680,9 @@ class EmbedderModel(nn.Module):
import pickle
import requests
self.model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2').cuda()
self.index = pickle.load(requests.get("https://f004.backblazeb2.com/file/naipublicbucketxyz/index.pkl", stream='True').raw)
self.tag_count = pickle.load(requests.get("https://f004.backblazeb2.com/file/naipublicbucketxyz/all_tags.pkl", stream='True').raw)
r = requests.get("https://f004.backblazeb2.com/file/naipublicbucketxyz/knn.index", stream='True')
self.index = pickle.load(requests.get("https://f004.backblazeb2.com/file/naipublicbucketxyz/safe/index.pkl", stream='True').raw)
self.tag_count = pickle.load(requests.get("https://f004.backblazeb2.com/file/naipublicbucketxyz/safe/all_tags.pkl", stream='True').raw)
r = requests.get("https://f004.backblazeb2.com/file/naipublicbucketxyz/safe/knn.index", stream='True')
with open("knn.index", "wb") as f:
f.write(r.content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment