Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ if 'max_new_tokens' not in st.session_state:
|
|
142 |
st.session_state['max_new_tokens'] = 500 # max tokens generated by LLM
|
143 |
|
144 |
|
145 |
-
# This is the list of countries present in the vector store, since the vector store is previously prepared as they take very long to prepare
|
146 |
# This is for the RetrievalQA tool later to check, because even if the country given to it is not in the vector store,
|
147 |
# it would still filter the vector store with this country and give an empty result, instead of giving an error.
|
148 |
# We have to manually return the error to let the agent using the tool know.
|
@@ -456,15 +456,19 @@ if page == "Chat Config":
|
|
456 |
# to override existing data on new scraped data or new pdf uploaded
|
457 |
if page == "Document, Retriever, Web Scraping Config":
|
458 |
st.header(page)
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
|
|
|
|
463 |
)
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
|
|
468 |
)
|
469 |
|
470 |
|
|
|
142 |
st.session_state['max_new_tokens'] = 500 # max tokens generated by LLM
|
143 |
|
144 |
|
145 |
+
# This is the list of countries present in the pre-built vector store, since the vector store is previously prepared as they take very long to prepare
|
146 |
# This is for the RetrievalQA tool later to check, because even if the country given to it is not in the vector store,
|
147 |
# it would still filter the vector store with this country and give an empty result, instead of giving an error.
|
148 |
# We have to manually return the error to let the agent using the tool know.
|
|
|
456 |
# to override existing data on new scraped data or new pdf uploaded
|
457 |
if page == "Document, Retriever, Web Scraping Config":
|
458 |
st.header(page)
|
459 |
+
|
460 |
+
st.selectbox(
|
461 |
+
"Chunk Size",
|
462 |
+
options=[500, 600, 700, 800, 900, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000],
|
463 |
+
on_change=get_retrievers,
|
464 |
+
key="chunk_size"
|
465 |
)
|
466 |
+
|
467 |
+
st.selectbox(
|
468 |
+
"Chunk Overlap",
|
469 |
+
options=[50, 100, 150, 200],
|
470 |
+
on_change=get_retrievers,
|
471 |
+
key="chunk_overlap"
|
472 |
)
|
473 |
|
474 |
|