add advanced mode toggle button

This commit is contained in:
sean1832 2023-02-14 03:33:47 +11:00
parent 8c1af5b538
commit 2430b9e2d4

View File

@ -1,4 +1,5 @@
import streamlit as st
import streamlit_toggle as st_toggle
from modules import utilities as util
from modules import model_data
import brain
@ -81,6 +82,7 @@ def process_response(query, target_model, prompt_file: str, data: model_data.par
# sidebar
with st.sidebar:
st.title('Settings')
advanced_mode = st_toggle.st_toggle_switch('Advanced mode', default_value=False)
prompt_files = util.scan_directory(PROMPT_PATH)
prompt_file_names = [util.get_file_name(file) for file in prompt_files]
@ -164,4 +166,4 @@ with body:
# execute brain calculation
if not question == '' and send:
execute_brain(question)
execute_brain(question)