Spaces:
Runtime error
Runtime error
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") | |