Skip to content

aks1207/kubeflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

from langchain.document_loaders import PyPDFLoader loader=PyPDFLoader('chargeback-guide.pdf') pages=loader.load() from langchain.text_splitter import RecursiveCharacterTextSplitter, CharacterTextSplitter chunk_size = 1500 chunk_overlap = 150 r_splitter = RecursiveCharacterTextSplitter( chunk_size=chunk_size, chunk_overlap=chunk_overlap ) splits=r_splitter.split_documents(pages) from langchain.embeddings import HuggingFaceEmbeddings embedding_model=HuggingFaceEmbeddings() paras=[i.page_content for i in splits] from langchain.vectorstores import FAISS db=FAISS.from_texts(sample,embedding_model)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages