Spaces:
Build error
Build error
Chandranshu Jain
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,9 +57,9 @@ def get_pdf(pdf_docs,query):
|
|
| 57 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
| 58 |
vector = Chroma.from_documents(chunk, embeddings)
|
| 59 |
docs = db3.similarity_search(query)
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
#st.write("Reply: ", response["output_text"])
|
| 64 |
|
| 65 |
def main():
|
|
|
|
| 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
|
| 63 |
#st.write("Reply: ", response["output_text"])
|
| 64 |
|
| 65 |
def main():
|