Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,7 +79,7 @@ def ask_pdfs(user_question):
|
|
| 79 |
|
| 80 |
# Create a question answering system based on information retrieval using the RetrievalQA class, which takes as input a neural language model, a chain type and a retriever (an object that allows you to retrieve the most relevant chunks of text for a query)
|
| 81 |
retriever = VectorStoreRetriever(vectorstore=vector_store)
|
| 82 |
-
qa = RetrievalQA.from_llm(llm=llm, retriever=retriever)
|
| 83 |
response =qa.run(user_question)
|
| 84 |
#print("Response:",response)
|
| 85 |
|
|
|
|
| 79 |
|
| 80 |
# Create a question answering system based on information retrieval using the RetrievalQA class, which takes as input a neural language model, a chain type and a retriever (an object that allows you to retrieve the most relevant chunks of text for a query)
|
| 81 |
retriever = VectorStoreRetriever(vectorstore=vector_store)
|
| 82 |
+
qa = RetrievalQA.from_llm(llm=llm, retriever=retriever, return_source_documents=True)
|
| 83 |
response =qa.run(user_question)
|
| 84 |
#print("Response:",response)
|
| 85 |
|