Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,11 @@ def find(query):
|
|
22 |
model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')
|
23 |
|
24 |
documents = quran_splitted['text'].tolist()
|
25 |
-
document_embeddings = model.encode(documents, convert_to_tensor=True, normalize_embeddings=True)
|
26 |
-
filename = 'encoded_quran_text_split_multilingual-e5-large-instruct.sav'
|
27 |
-
pickle.dump(embeddings, open(filename, 'wb'))
|
28 |
-
|
29 |
-
|
30 |
print("cekpoin1\n")
|
31 |
|
32 |
query_embeddings = model.encode(queries, convert_to_tensor=True, normalize_embeddings=True)
|
|
|
22 |
model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')
|
23 |
|
24 |
documents = quran_splitted['text'].tolist()
|
25 |
+
# document_embeddings = model.encode(documents, convert_to_tensor=True, normalize_embeddings=True)
|
26 |
+
# filename = 'encoded_quran_text_split_multilingual-e5-large-instruct.sav'
|
27 |
+
# pickle.dump(embeddings, open(filename, 'wb'))
|
28 |
+
file = open('encoded_quran_text_split_multilingual-e5-large-instructs.sav','rb')
|
29 |
+
document_embeddings = pickle.load(file)
|
30 |
print("cekpoin1\n")
|
31 |
|
32 |
query_embeddings = model.encode(queries, convert_to_tensor=True, normalize_embeddings=True)
|