Spaces:
Sleeping
Sleeping
Update cura/vector_store.py
Browse files- cura/vector_store.py +2 -3
cura/vector_store.py
CHANGED
@@ -30,7 +30,7 @@ def set_up_chromadb(collection_name: str):
|
|
30 |
return collection
|
31 |
|
32 |
|
33 |
-
def index_vector_store_chroma(
|
34 |
"""
|
35 |
Index the files in the ChromaDB collection.
|
36 |
|
@@ -45,7 +45,7 @@ def index_vector_store_chroma(collection: Collection, files: list):
|
|
45 |
True if the data is stored successfully, False otherwise.
|
46 |
"""
|
47 |
# Set up collection
|
48 |
-
|
49 |
print("Indexing files...")
|
50 |
ids = []
|
51 |
for i in range(len(files[0])):
|
@@ -77,4 +77,3 @@ def query_vector_store_chroma(collection: Collection, query: str):
|
|
77 |
except:
|
78 |
print("Error querying ChromaDB")
|
79 |
return None
|
80 |
-
|
|
|
30 |
return collection
|
31 |
|
32 |
|
33 |
+
def index_vector_store_chroma(collection_name, files: list):
|
34 |
"""
|
35 |
Index the files in the ChromaDB collection.
|
36 |
|
|
|
45 |
True if the data is stored successfully, False otherwise.
|
46 |
"""
|
47 |
# Set up collection
|
48 |
+
collection = set_up_chromadb(collection_name)
|
49 |
print("Indexing files...")
|
50 |
ids = []
|
51 |
for i in range(len(files[0])):
|
|
|
77 |
except:
|
78 |
print("Error querying ChromaDB")
|
79 |
return None
|
|