Spaces:
Sleeping
Sleeping
Update Index.py
Browse files
Index.py
CHANGED
@@ -96,7 +96,7 @@ def _upsert_docs(doc, embeddings, vector_doc_path: str, db_present: bool):
|
|
96 |
print(vector_doc_path)
|
97 |
if db_present:
|
98 |
print(1)
|
99 |
-
max_index = _max_index_id(f"{vector_doc_path}")
|
100 |
print(max_index)
|
101 |
embeddings.upsert(_stream(doc, 500, max_index["max_index"]))
|
102 |
print("Embeddings done!!")
|
@@ -106,7 +106,7 @@ def _upsert_docs(doc, embeddings, vector_doc_path: str, db_present: bool):
|
|
106 |
print(2)
|
107 |
embeddings.index(_stream(doc, 500, 0))
|
108 |
embeddings.save(vector_doc_path)
|
109 |
-
max_index = _max_index_id(f"{vector_doc_path}")
|
110 |
print(max_index)
|
111 |
# check
|
112 |
# max_index = _max_index_id(f"{vector_doc_path}/documents")
|
|
|
96 |
print(vector_doc_path)
|
97 |
if db_present:
|
98 |
print(1)
|
99 |
+
max_index = _max_index_id(f"{vector_doc_path}/documents")
|
100 |
print(max_index)
|
101 |
embeddings.upsert(_stream(doc, 500, max_index["max_index"]))
|
102 |
print("Embeddings done!!")
|
|
|
106 |
print(2)
|
107 |
embeddings.index(_stream(doc, 500, 0))
|
108 |
embeddings.save(vector_doc_path)
|
109 |
+
max_index = _max_index_id(f"{vector_doc_path}/documents")
|
110 |
print(max_index)
|
111 |
# check
|
112 |
# max_index = _max_index_id(f"{vector_doc_path}/documents")
|