diff --git a/main.py b/main.py index e22a907..b568c46 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ import logging +import os import argparse import chromadb @@ -11,7 +12,9 @@ from chunker import Chunker from dotenv import load_dotenv -client = chromadb.PersistentClient(path="/Users/ryanchen/Programs/raggr/chromadb") +load_dotenv() + +client = chromadb.PersistentClient(path=os.getenv("CHROMADB_PATH", "")) simba_docs = client.get_or_create_collection(name="simba_docs") feline_vet_lookup = client.get_or_create_collection(name="feline_vet_lookup") @@ -24,8 +27,6 @@ parser.add_argument( "--reindex", action="store_true", help="re-index the simba documents" ) -load_dotenv() - def chunk_data(texts: list[str], collection): # Step 2: Create chunks