Update app.py
Browse files
app.py
CHANGED
@@ -103,8 +103,17 @@ def main():
|
|
103 |
]
|
104 |
|
105 |
st.markdown("Hi, I am Birute, chat assistant, based on republic of Lithuania law documents. You can choose below information retrieval type and how many documents you want to be retrieved.")
|
106 |
-
search_type = st.selectbox(
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type=search_type, k=k, chunk_size=450, chunk_overlap=20)
|
109 |
|
110 |
if user_question := st.text_input("Ask a question about your documents:"):
|
|
|
103 |
]
|
104 |
|
105 |
st.markdown("Hi, I am Birute, chat assistant, based on republic of Lithuania law documents. You can choose below information retrieval type and how many documents you want to be retrieved.")
|
106 |
+
search_type = st.selectbox(
|
107 |
+
"Choose search type. Options are [Max marginal relevance search (mmr) , Similarity search (similarity). Default value (mmr)]",
|
108 |
+
options=["mmr", "similarity"],
|
109 |
+
index=0 # Default to "mmr"
|
110 |
+
)
|
111 |
+
|
112 |
+
k = st.select_slider(
|
113 |
+
"Select amount of documents to be retrieved. Default value (5): ",
|
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=450, chunk_overlap=20)
|
118 |
|
119 |
if user_question := st.text_input("Ask a question about your documents:"):
|