bohmian commited on
Commit
f9cb3b5
1 Parent(s): 27e1362

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
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
- st.session_state['chunk_size'] = st.selectbox(
460
- "Chunk Size",
461
- options=[500, 600, 700, 800, 900, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000],
462
- on_change=get_retrievers
 
 
463
  )
464
- st.session_state['chunk_overlap'] = st.selectbox(
465
- "Chunk Overlap",
466
- options=[50, 100, 150, 200],
467
- on_change=get_retrievers
 
 
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