Spaces:
Runtime error
Runtime error
File size: 358 Bytes
d73cde1 |
1 2 3 4 5 6 7 8 9 10 |
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")
|