Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ os.environ["LANGCHAIN_PROJECT"] = "Lithuanian_Law_RAG_QA"
|
|
33 |
|
34 |
|
35 |
|
36 |
-
def create_retriever_from_chroma(vectorstore_path="./docs/chroma/", search_type='mmr', k=7, chunk_size=
|
37 |
|
38 |
model_name = "Alibaba-NLP/gte-base-en-v1.5"
|
39 |
model_kwargs = {'device': 'cpu',
|
@@ -114,7 +114,7 @@ def main():
|
|
114 |
options=list(range(2, 16)), # Creates a list [2, 3, 4, ..., 15]
|
115 |
value=5 # Default value
|
116 |
)
|
117 |
-
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type=search_type, k=k, chunk_size=
|
118 |
|
119 |
if user_question := st.text_input("Ask a question about your documents:"):
|
120 |
handle_userinput(user_question,retriever)
|
|
|
33 |
|
34 |
|
35 |
|
36 |
+
def create_retriever_from_chroma(vectorstore_path="./docs/chroma/", search_type='mmr', k=7, chunk_size=300, chunk_overlap=30,lambda_mult= 0.7):
|
37 |
|
38 |
model_name = "Alibaba-NLP/gte-base-en-v1.5"
|
39 |
model_kwargs = {'device': 'cpu',
|
|
|
114 |
options=list(range(2, 16)), # Creates a list [2, 3, 4, ..., 15]
|
115 |
value=5 # Default value
|
116 |
)
|
117 |
+
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type=search_type, k=k, chunk_size=300, chunk_overlap=30)
|
118 |
|
119 |
if user_question := st.text_input("Ask a question about your documents:"):
|
120 |
handle_userinput(user_question,retriever)
|