Update app.py
Browse files
app.py
CHANGED
@@ -80,16 +80,9 @@ def create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type='m
|
|
80 |
|
81 |
retriever=vectorstore.as_retriever(search_type = search_type, search_kwargs={"k": k})
|
82 |
|
83 |
-
compressor = LLMChainExtractor.from_llm(llm)
|
84 |
-
|
85 |
-
compression_retriever = ContextualCompressionRetriever(
|
86 |
-
base_compressor=compressor,
|
87 |
-
base_retriever=retriever
|
88 |
-
)
|
89 |
-
|
90 |
|
91 |
|
92 |
-
return
|
93 |
|
94 |
|
95 |
|
@@ -114,7 +107,7 @@ def main():
|
|
114 |
st.markdown("Hi, I am Qwen, chat mmodel, based on respublic of Lithuania law document. Write you question and press enter to start chat.")
|
115 |
|
116 |
|
117 |
-
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type='mmr', k=
|
118 |
if user_question := st.text_input("Ask a question about your documents:"):
|
119 |
handle_userinput(user_question,retriever)
|
120 |
|
|
|
80 |
|
81 |
retriever=vectorstore.as_retriever(search_type = search_type, search_kwargs={"k": k})
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
|
85 |
+
return retriever
|
86 |
|
87 |
|
88 |
|
|
|
107 |
st.markdown("Hi, I am Qwen, chat mmodel, based on respublic of Lithuania law document. Write you question and press enter to start chat.")
|
108 |
|
109 |
|
110 |
+
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type='mmr', k=12, chunk_size=120, chunk_overlap=20)
|
111 |
if user_question := st.text_input("Ask a question about your documents:"):
|
112 |
handle_userinput(user_question,retriever)
|
113 |
|