rasyosef commited on
Commit
1e7cadb
β€’
1 Parent(s): 64f661a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,8 +60,8 @@ def prepare_vector_store_retriever(filename):
60
  # Split the text
61
  text_splitter = CharacterTextSplitter(
62
  separator="\n\n",
63
- chunk_size=400,
64
- chunk_overlap=100,
65
  length_function=len
66
  )
67
 
@@ -71,7 +71,7 @@ def prepare_vector_store_retriever(filename):
71
  embeddings = HuggingFaceEmbeddings()
72
  vectorstore = FAISS.from_documents(documents, embeddings)
73
 
74
- return VectorStoreRetriever(vectorstore=vectorstore)
75
 
76
  # Retrieveal QA chian
77
  def get_retrieval_qa_chain(text_file):
 
60
  # Split the text
61
  text_splitter = CharacterTextSplitter(
62
  separator="\n\n",
63
+ chunk_size=800,
64
+ chunk_overlap=0,
65
  length_function=len
66
  )
67
 
 
71
  embeddings = HuggingFaceEmbeddings()
72
  vectorstore = FAISS.from_documents(documents, embeddings)
73
 
74
+ return VectorStoreRetriever(vectorstore=vectorstore, search_kwargs={"k": 2})
75
 
76
  # Retrieveal QA chian
77
  def get_retrieval_qa_chain(text_file):