Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def init_chromadb():
|
|
55 |
|
56 |
# Create the vectorestore to use as the index
|
57 |
vectorstore = Chroma.from_documents(texts, embeddings, persist_directory=DB_DIR)
|
58 |
-
vectorstore.persist()
|
59 |
|
60 |
print(vectorstore)
|
61 |
#vectorstore = None
|
@@ -79,7 +79,7 @@ def query_chromadb():
|
|
79 |
#embeddings = OpenAIEmbeddings()
|
80 |
# Load Vector store from local disk
|
81 |
vectorstore = Chroma(persist_directory=DB_DIR, embedding_function=embeddings)
|
82 |
-
vectorstore.persist()
|
83 |
|
84 |
result = vectorstore.similarity_search_with_score(query="how to use AI in water conservation?", k=4)
|
85 |
|
|
|
55 |
|
56 |
# Create the vectorestore to use as the index
|
57 |
vectorstore = Chroma.from_documents(texts, embeddings, persist_directory=DB_DIR)
|
58 |
+
#vectorstore.persist()
|
59 |
|
60 |
print(vectorstore)
|
61 |
#vectorstore = None
|
|
|
79 |
#embeddings = OpenAIEmbeddings()
|
80 |
# Load Vector store from local disk
|
81 |
vectorstore = Chroma(persist_directory=DB_DIR, embedding_function=embeddings)
|
82 |
+
#vectorstore.persist()
|
83 |
|
84 |
result = vectorstore.similarity_search_with_score(query="how to use AI in water conservation?", k=4)
|
85 |
|