Spaces:
Sleeping
Sleeping
Update create_database.py
Browse files- create_database.py +1 -1
create_database.py
CHANGED
@@ -19,7 +19,7 @@ def create_database(txt):
|
|
19 |
chromadb.api.client.SharedSystemClient.clear_system_cache()
|
20 |
|
21 |
chroma_cli = chromadb.Client()
|
22 |
-
existing_collections = [collection.name for collection in
|
23 |
if "chat-with-docs" in existing_collections:
|
24 |
chroma_cli.delete_collection(name="chat-with-docs")
|
25 |
collection = chroma_cli.create_collection("chat-with-docs",embedding_function=embedding_fn)
|
|
|
19 |
chromadb.api.client.SharedSystemClient.clear_system_cache()
|
20 |
|
21 |
chroma_cli = chromadb.Client()
|
22 |
+
existing_collections = [collection.name for collection in chroma_cli.list_collections()]
|
23 |
if "chat-with-docs" in existing_collections:
|
24 |
chroma_cli.delete_collection(name="chat-with-docs")
|
25 |
collection = chroma_cli.create_collection("chat-with-docs",embedding_function=embedding_fn)
|