hanzla commited on
Commit
ecb91c8
1 Parent(s): f2473b4
Files changed (2) hide show
  1. src/interface.py +1 -1
  2. src/pdfchatbot.py +1 -1
src/interface.py CHANGED
@@ -36,7 +36,7 @@ def create_demo():
36
  )
37
  with gr.Row():
38
  slider_k = gr.Slider(
39
- minimum=1, maximum=5, value=2, label="Max Chunks in Context", elem_id='slider2'
40
  )
41
 
42
  # Input and Submit Button Row
 
36
  )
37
  with gr.Row():
38
  slider_k = gr.Slider(
39
+ minimum=1, step=1,maximum=5, value=2, label="Max Chunks in Context", elem_id='slider2'
40
  )
41
 
42
  # Input and Submit Button Row
src/pdfchatbot.py CHANGED
@@ -48,7 +48,7 @@ class PDFChatBot:
48
  print("Embedding model loaded")
49
 
50
  def load_vectordb(self):
51
- overlap = (self.overlap_percentage/100) * self.chunk_size
52
  text_splitter = RecursiveCharacterTextSplitter(
53
  chunk_size=self.chunk_size,
54
  chunk_overlap=overlap,
 
48
  print("Embedding model loaded")
49
 
50
  def load_vectordb(self):
51
+ overlap = int((self.overlap_percentage/100) * self.chunk_size)
52
  text_splitter = RecursiveCharacterTextSplitter(
53
  chunk_size=self.chunk_size,
54
  chunk_overlap=overlap,