nirmalaag commited on
Commit
971fc58
·
verified ·
1 Parent(s): 89be8fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,7 +52,7 @@ def main():
52
  length_function=len
53
  )
54
  chunks = text_splitter.split_text(text=text)
55
- #chunks_doc = text_splitter.create_documents(text)
56
 
57
  # embeddings
58
  embeddings = HuggingFaceEmbeddings()
@@ -71,7 +71,7 @@ def main():
71
  if query == 'Summarize':
72
  #docs = pdf_reader.load_and_split()
73
  chain = load_summarize_chain(llm, chain_type="map_reduce")
74
- response = chain.run(chunks[0])
75
  else:
76
  docs = vector_store.similarity_search(query=query, k=2)
77
  #st.write(docs)
 
52
  length_function=len
53
  )
54
  chunks = text_splitter.split_text(text=text)
55
+ chunks_doc = text_splitter.create_documents(text)
56
 
57
  # embeddings
58
  embeddings = HuggingFaceEmbeddings()
 
71
  if query == 'Summarize':
72
  #docs = pdf_reader.load_and_split()
73
  chain = load_summarize_chain(llm, chain_type="map_reduce")
74
+ response = chain.run(chunks_doc[0])
75
  else:
76
  docs = vector_store.similarity_search(query=query, k=2)
77
  #st.write(docs)