Chandranshu Jain commited on
Commit
724dd37
1 Parent(s): 5b20792

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -71,6 +71,7 @@ def embedding(chunk,query):
71
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
72
  db = Chroma.from_documents(chunk,embeddings)
73
  docs = db.similarity_search(query)
 
74
  chain = get_conversational_chain()
75
  response = chain({"input_documents": docs, "question": query}, return_only_outputs=True)
76
  st.write("Reply: ", response["output_text"])
@@ -86,7 +87,6 @@ def main():
86
  if st.button("Submit & Process", key="process_button"):
87
  with st.spinner("Processing..."):
88
  raw_text = get_pdf(pdf_docs)
89
- print(raw_text)
90
  text_chunks = text_splitter(raw_text)
91
  print(text_chunks)
92
  if query:
 
71
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
72
  db = Chroma.from_documents(chunk,embeddings)
73
  docs = db.similarity_search(query)
74
+ print(docs)
75
  chain = get_conversational_chain()
76
  response = chain({"input_documents": docs, "question": query}, return_only_outputs=True)
77
  st.write("Reply: ", response["output_text"])
 
87
  if st.button("Submit & Process", key="process_button"):
88
  with st.spinner("Processing..."):
89
  raw_text = get_pdf(pdf_docs)
 
90
  text_chunks = text_splitter(raw_text)
91
  print(text_chunks)
92
  if query: