AI-trainer1 commited on
Commit
186f122
·
verified ·
1 Parent(s): 2f1ed37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -46,8 +46,8 @@ class PDFQAProcessor:
46
  # )
47
 
48
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
49
- CHUNK_SIZE = 400
50
- CHUNK_OVERLAP = 50
51
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE,chunk_overlap = CHUNK_OVERLAP)
52
  # persist_directory="./chroma_db"
53
 
@@ -81,7 +81,7 @@ class PDFQAProcessor:
81
  splits,
82
  self.embeddings
83
  )
84
- self.retriever = self.vectorstore.as_retriever(search_kwargs={"k": 18})
85
  return "PDFs processed successfully! Ask your questions now."
86
 
87
  except Exception as e:
 
46
  # )
47
 
48
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
49
+ CHUNK_SIZE = 450
50
+ CHUNK_OVERLAP = 80
51
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE,chunk_overlap = CHUNK_OVERLAP)
52
  # persist_directory="./chroma_db"
53
 
 
81
  splits,
82
  self.embeddings
83
  )
84
+ self.retriever = self.vectorstore.as_retriever(search_kwargs={"k": 20})
85
  return "PDFs processed successfully! Ask your questions now."
86
 
87
  except Exception as e: