Resume_Analyzer / backend /vector_store.py
aminaj's picture
Upload 2 files
399cab8 verified
raw
history blame contribute delete
537 Bytes
from langchain_huggingface import HuggingFaceEmbeddings
from langchain_community.vectorstores import FAISS
# Initialize the Hugging Face embedding model
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")
def create_vector_store(chunks):
# Store embeddings into the vector store
vector_store = FAISS.from_documents(
documents=chunks, # Input chunks to the vector store
embedding=embeddings # Use the initialized embeddings model
)
return vector_store