Spaces:
Sleeping
Sleeping
Download vector_store.py from HamidOmarov/First_RAG_System: direct link, hf CLI and curl.
- Browser
- Download file 216 Bytes
-
https://huggingface.co/spaces/HamidOmarov/First_RAG_System/resolve/main/vector_store.py
- Command line
-
hf download hf://spaces/HamidOmarov/First_RAG_System/vector_store.py
-
curl -L -o vector_store.py https://huggingface.co/spaces/HamidOmarov/First_RAG_System/resolve/main/vector_store.py
216 Bytes
| import chromadb | |
| def get_chroma_client(): | |
| client = chromadb.PersistentClient(path="./chroma_db") | |
| return client | |
| def create_collection(client, name="pdf_docs"): | |
| return client.get_or_create_collection(name) |