Spaces:
Running
Running
Clement Vachet
commited on
Commit
·
fd5ccbe
1
Parent(s):
6f47899
Fix chromadb bug with default tenant missing
Browse files
app.py
CHANGED
@@ -75,6 +75,7 @@ def create_db(splits, collection_name):
|
|
75 |
model_kwargs={'device': 'cpu'},
|
76 |
# encode_kwargs={'normalize_embeddings': False}
|
77 |
)
|
|
|
78 |
new_client = chromadb.EphemeralClient()
|
79 |
vectordb = Chroma.from_documents(
|
80 |
documents=splits,
|
@@ -156,7 +157,7 @@ def create_collection_name(filepath):
|
|
156 |
collection_name = 'A' + collection_name[1:]
|
157 |
if not collection_name[-1].isalnum():
|
158 |
collection_name = collection_name[:-1] + 'Z'
|
159 |
-
print('
|
160 |
print('Collection name: ', collection_name)
|
161 |
return collection_name
|
162 |
|
|
|
75 |
model_kwargs={'device': 'cpu'},
|
76 |
# encode_kwargs={'normalize_embeddings': False}
|
77 |
)
|
78 |
+
chromadb.api.client.SharedSystemClient.clear_system_cache()
|
79 |
new_client = chromadb.EphemeralClient()
|
80 |
vectordb = Chroma.from_documents(
|
81 |
documents=splits,
|
|
|
157 |
collection_name = 'A' + collection_name[1:]
|
158 |
if not collection_name[-1].isalnum():
|
159 |
collection_name = collection_name[:-1] + 'Z'
|
160 |
+
print('\n\nFilepath: ', filepath)
|
161 |
print('Collection name: ', collection_name)
|
162 |
return collection_name
|
163 |
|