Makewell / ingest.py
AliHaider0343's picture
Upload 17 files
d73cde1 verified
raw
history blame
358 Bytes
from imports import *
loader = CSVLoader(file_path='Data/Procedures_data.csv')
documents = loader.load()
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
texts = text_splitter.split_documents(documents)
embeddings = OpenAIEmbeddings()
db = FAISS.from_documents(texts, embeddings)
db.save_local("Data/faiss_index")