diff --git a/ingest.py b/ingest.py index 07a85f4..43f7ec2 100755 --- a/ingest.py +++ b/ingest.py @@ -149,15 +149,19 @@ def main(): db = Chroma(persist_directory=persist_directory, embedding_function=embeddings, client_settings=CHROMA_SETTINGS) collection = db.get() texts = process_documents([metadata['source'] for metadata in collection['metadatas']]) + print(f"Creating embeddings. May take some minutes...") db.add_documents(texts) else: # Create and store locally vectorstore print("Creating new vectorstore") texts = process_documents() + print(f"Creating embeddings. May take some minutes...") db = Chroma.from_documents(texts, embeddings, persist_directory=persist_directory, client_settings=CHROMA_SETTINGS) db.persist() db = None + print(f"Ingestion complete! You can now run privateGPT.py to query your documents") + if __name__ == "__main__": main()