gmustafa413 commited on
Commit
ed7cd09
·
verified ·
1 Parent(s): f544dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -106,7 +106,7 @@ class DocumentProcessor:
106
  try:
107
  embeddings = MODEL.encode(
108
  all_chunks,
109
- batch_size=512,
110
  convert_to_tensor=True,
111
  show_progress_bar=False
112
  ).cpu().numpy().astype('float32')
@@ -192,7 +192,7 @@ class DocumentProcessor:
192
  processor = DocumentProcessor()
193
 
194
  # Gradio interface with improved error handling
195
- def ask_question(question, chat_history):
196
  if not question.strip():
197
  return chat_history + [("", "Please enter a valid question")]
198
 
 
106
  try:
107
  embeddings = MODEL.encode(
108
  all_chunks,
109
+ batch_size=256, #512
110
  convert_to_tensor=True,
111
  show_progress_bar=False
112
  ).cpu().numpy().astype('float32')
 
192
  processor = DocumentProcessor()
193
 
194
  # Gradio interface with improved error handling
195
+ def ask_question(question, chat_history=''):
196
  if not question.strip():
197
  return chat_history + [("", "Please enter a valid question")]
198