abishek-official commited on
Commit
f661324
1 Parent(s): b26d323

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,14 +25,14 @@ def get_text_chunks(text):
25
  chunk_overlap=200,
26
  length_function=len
27
  )
28
- chunks = text_splitter.split_text(text)
29
  return chunks
30
 
31
 
32
  def get_vectorstore(text_chunks):
33
  #embeddings = OpenAIEmbeddings()
34
  embeddings = HuggingFaceBgeEmbeddings(model_name="hkunlp/instructor-large")
35
- vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
36
  return vectorstore
37
 
38
 
 
25
  chunk_overlap=200,
26
  length_function=len
27
  )
28
+ chunks = text_splitter.split_documents(text)
29
  return chunks
30
 
31
 
32
  def get_vectorstore(text_chunks):
33
  #embeddings = OpenAIEmbeddings()
34
  embeddings = HuggingFaceBgeEmbeddings(model_name="hkunlp/instructor-large")
35
+ vectorstore = FAISS.from_documents(texts=text_chunks, embedding=embeddings)
36
  return vectorstore
37
 
38