Chandranshu Jain commited on
Commit
df226f2
1 Parent(s): 012600d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,7 +56,7 @@ def get_pdf(pdf_docs,query):
56
  chunks=text_splitter.split_text(text)
57
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
58
  vector = Chroma.from_documents(chunk, embeddings)
59
- docs = db3.similarity_search(query)
60
  chain = get_conversational_chain()
61
  response = chain({"input_documents": docs, "question": query}, return_only_outputs=True)
62
  return response
@@ -72,7 +72,7 @@ def main():
72
  with st.spinner("Processing..."):
73
  output = get_pdf(pdf_docs,question)
74
  st.success("Done")
75
- st.write("Reply: ", output["output_text"])
76
 
77
 
78
  if __name__ == "__main__":
 
56
  chunks=text_splitter.split_text(text)
57
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
58
  vector = Chroma.from_documents(chunk, embeddings)
59
+ docs = vector.similarity_search(query)
60
  chain = get_conversational_chain()
61
  response = chain({"input_documents": docs, "question": query}, return_only_outputs=True)
62
  return response
 
72
  with st.spinner("Processing..."):
73
  output = get_pdf(pdf_docs,question)
74
  st.success("Done")
75
+ st.write("Reply: ", output["output_text"])
76
 
77
 
78
  if __name__ == "__main__":