First_RAG_System / day3 /vector_store.py
Hamid Omarov
HF Space app + minimal pipeline code (no secrets)
e7e9247
raw
history blame
464 Bytes
# vector_store.py
import chromadb
# New persistent client (replaces Settings / duckdb+parquet)
client = chromadb.PersistentClient(path="./chroma_db")
# Create or get collection
collection = client.get_or_create_collection("pdf_docs")
def reset_db():
client.delete_collection("pdf_docs")
return client.get_or_create_collection("pdf_docs")
if __name__ == "__main__":
print("ChromaDB ready. Collections:", [c.name for c in client.list_collections()])