Spaces:
Build error
Build error
add chroma reset
Browse files
app.py
CHANGED
|
@@ -194,7 +194,7 @@ def load_documents(file_path: str, mode: str = "elements"):
|
|
| 194 |
|
| 195 |
def initialize_chroma(collection_name: str, embedding_function: MyEmbeddingFunction):
|
| 196 |
client = chromadb.HttpClient(host='localhost', port=8000)
|
| 197 |
-
|
| 198 |
collection = client.create_collection(collection_name)
|
| 199 |
return client, collection
|
| 200 |
|
|
|
|
| 194 |
|
| 195 |
def initialize_chroma(collection_name: str, embedding_function: MyEmbeddingFunction):
|
| 196 |
client = chromadb.HttpClient(host='localhost', port=8000)
|
| 197 |
+
client.reset() # resets the database
|
| 198 |
collection = client.create_collection(collection_name)
|
| 199 |
return client, collection
|
| 200 |
|