The default streamlit theme can now be customized from the UI as well as the UI config file.

This commit is contained in:
ZeroCool940711 2022-09-26 01:20:31 -07:00
parent b410dd4781
commit eb9145000a
2 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,7 @@
# of the properties below.
general:
streamlit_telemetry: False
default_theme: dark
gpu: 0
outdir: outputs
default_model: "Stable Diffusion v1.4"

View File

@ -186,11 +186,17 @@ def layout():
with col4:
st.title("Streamlit Config")
st.session_state["defaults"].general.streamlit_telemetry = st.checkbox("Enable Telemetry", value=st.session_state['defaults'].general.streamlit_telemetry,
help="Enables or Disables streamlit telemetry. Default: False")
st.session_state["streamlit_config"]["browser"]["gatherUsageStats"] = st.session_state["defaults"].general.streamlit_telemetry
default_theme_list = ["light", "dark"]
st.session_state["defaults"].general.default_theme = st.selectbox("Default Theme", default_theme_list, index=default_theme_list.index(st.session_state['defaults'].general.default_theme),
help="Defaut theme to use as base for streamlit. Default: dark")
st.session_state["streamlit_config"]["theme"]["base"] = st.session_state["defaults"].general.default_theme
with txt2img_tab:
st.title("Text To Image")