Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ if query:
|
|
| 61 |
try:
|
| 62 |
with open(file_path, "rb") as f:
|
| 63 |
vectorstore = pickle.load(f)
|
| 64 |
-
chain = RetrievalQAWithSourcesChain.from_llm(llm=llm, retriever=
|
| 65 |
result = chain({"question": query}, return_only_outputs=True)
|
| 66 |
# result will be a dictionary of this format --> {"answer": "", "sources": [] }
|
| 67 |
st.header("Answer")
|
|
|
|
| 61 |
try:
|
| 62 |
with open(file_path, "rb") as f:
|
| 63 |
vectorstore = pickle.load(f)
|
| 64 |
+
chain = RetrievalQAWithSourcesChain.from_llm(llm=llm, retriever=vector_store.as_retriever())
|
| 65 |
result = chain({"question": query}, return_only_outputs=True)
|
| 66 |
# result will be a dictionary of this format --> {"answer": "", "sources": [] }
|
| 67 |
st.header("Answer")
|