Chandranshu Jain commited on
Commit
0315eec
1 Parent(s): bacfca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -70,10 +70,11 @@ def get_conversational_chain():
70
  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
  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"])
78
 
79
 
 
70
  def embedding(chunk,query):
71
  embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
72
  db = Chroma.from_documents(chunk,embeddings)
73
+ doc = db.similarity_search(query)
74
  print(docs)
75
  chain = get_conversational_chain()
76
+ response = chain({"input_documents": doc, "question": query}, return_only_outputs=True)
77
+ print(response)
78
  st.write("Reply: ", response["output_text"])
79
 
80