Update app.py
Browse files
app.py
CHANGED
|
@@ -91,12 +91,12 @@ def main():
|
|
| 91 |
|
| 92 |
def handle_userinput(user_question):
|
| 93 |
retriever = create_retriever_from_chroma(data_path, vectorstore_path="docs/chroma/", search_type='mmr', k=7, chunk_size=250, chunk_overlap=20)
|
| 94 |
-
docs = retriever.invoke(
|
| 95 |
|
| 96 |
doc_txt = [doc.page_content for doc in docs]
|
| 97 |
|
| 98 |
Rag_chain = create_conversational_rag_chain(retriever)
|
| 99 |
-
response = rag_chain.invoke({"context": doc_txt, "question":
|
| 100 |
with st.chat_message("Assistant"):
|
| 101 |
st.write(response)
|
| 102 |
|
|
|
|
| 91 |
|
| 92 |
def handle_userinput(user_question):
|
| 93 |
retriever = create_retriever_from_chroma(data_path, vectorstore_path="docs/chroma/", search_type='mmr', k=7, chunk_size=250, chunk_overlap=20)
|
| 94 |
+
docs = retriever.invoke(user_question)
|
| 95 |
|
| 96 |
doc_txt = [doc.page_content for doc in docs]
|
| 97 |
|
| 98 |
Rag_chain = create_conversational_rag_chain(retriever)
|
| 99 |
+
response = rag_chain.invoke({"context": doc_txt, "question": user_question})
|
| 100 |
with st.chat_message("Assistant"):
|
| 101 |
st.write(response)
|
| 102 |
|