Spaces:
Running
Running
Download backend/src/vector_store.py from SarthakVE/Resume_Analyzer: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/spaces/SarthakVE/Resume_Analyzer/resolve/main/backend/src/vector_store.py
- Command line
-
hf download hf://spaces/SarthakVE/Resume_Analyzer/backend/src/vector_store.py
-
curl -L -o vector_store.py https://huggingface.co/spaces/SarthakVE/Resume_Analyzer/resolve/main/backend/src/vector_store.py
393 Bytes
| from langchain_community.vectorstores import FAISS | |
| def create_vector_store(documents, embedding_model): | |
| vectorstore = FAISS.from_documents(documents, embedding_model) | |
| return vectorstore | |
| def save_vector_store(vectorstore, path="faiss_index"): | |
| vectorstore.save_local(path) | |
| def load_vector_store(path, embedding_model): | |
| return FAISS.load_local(path, embedding_model) |