pradeepsengarr commited on
Commit
1b0749c
·
verified ·
1 Parent(s): 948c6d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,7 +40,7 @@ def read_pdf(file):
40
  logging.error(f"Failed to extract text: {e}")
41
  return ""
42
 
43
- # --- Process Answer ---
44
  def process_answer(question, full_text):
45
  # Save the full_text to a temporary file
46
  with open("temp_text.txt", "w") as f:
@@ -54,7 +54,7 @@ def process_answer(question, full_text):
54
  splits = text_splitter.split_documents(docs)
55
 
56
  # Load embeddings
57
- embeddings = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
58
 
59
  # Create Chroma in-memory vector store
60
  db = Chroma.from_documents(splits, embedding=embeddings)
 
40
  logging.error(f"Failed to extract text: {e}")
41
  return ""
42
 
43
+ # --- Process Answer ---dd
44
  def process_answer(question, full_text):
45
  # Save the full_text to a temporary file
46
  with open("temp_text.txt", "w") as f:
 
54
  splits = text_splitter.split_documents(docs)
55
 
56
  # Load embeddings
57
+ embeddings = SentenceTransformerEmbeddings(model_name="BAAI/bge-base-en-v1.5")
58
 
59
  # Create Chroma in-memory vector store
60
  db = Chroma.from_documents(splits, embedding=embeddings)