Streamlit app does not update when theme is change in config.toml on repo


My folders in github are


  • .streamlit/config.toml

In my config.toml file I have only 2 lines

The app runs on the streamlit cloud with link:
link to app

The application did not change to light. It used to be dark. The theme remains dark in the cloud.
Locally, I have the same folders and everything works fine if i run it. I see others have had unresolved issues on this. Any help is appreciated.

Python: 3.10
Streamlit: latest version
Conda: yes

1 Like

Hi @hans,

Thanks for posting!

The link to your app is not working. Maybe the app is private? Did you deploy it from a private repo?

Send a public link so we can test it out. Share the code as well if you don’t mind for us to recreate it.

Sorry, changed to public. The repo however is private

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import streamlit as st

# %% load data (functions with st.cache decorator)

# %% use defined functions

# %% feature engineering

# %%

characteristics = {
    'Style': ['Absolute return: max return for min drawdown'],
    'Category': ['Multi-asset tactical asset allocation strategy'],
    'Direction': ['Long - Flat'],
    'Factors': ['Trend & momentum'],
    'Assets': ['Multi-asset'],
    'Instruments': ['ETFs & T-bills'],
    'Frequency': ['Monthly rebalancing']

char_df = pd.DataFrame.from_dict(characteristics, orient='index', columns=[''])

# %%

side = st.sidebar

with side:
    st.markdown("## CORE TREND MODEL")
    st.selectbox("Choose your region", options=('Global', 'US', 'Euro zone'))
    st.markdown("## MODEL INFO")
    with st.expander('characteristics'):

    with st.expander('short description'):
        st.markdown(" The core trend model blabbalbb;ab;ablmfklhkl and blababjlmhzehfljkhzjqfhjzhfjh"
                    "ljzhfjhrazjkh ")

    with st.expander('Strategy rules'):
                    Strategy rule 1  blablablkz=f;kzklaefkljkzj;f=h;ablab;abab\n
                    Strategy rule 2 
    with st.expander('credits'):
        st.markdown(" Credits to paper blablbal")
    with st.expander('future work'):
        st.markdown(" In the near we future we will update blabababa;b;aba;ba;ba;ab;ab;ab;aba;ab and we will blab"

base, performance, allocations, backtest, fiddle = st.tabs(['PERFORMANCE CHART', 'PERFORMANCE TABLE',
                                                            'ALLOCATIONS', 'BACK-TEST',
                                                            'PLAY AROUND WITH THE MODEL'])

# %%

with base:
    st.subheader(" Performance chart")
    with st.expander('another chart (expand to see)'):
        fig, ax = plt.subplots()
        ax.plot(np.arange(1, 101), np.random.normal(100, 1, 100))
with performance:
    st.subheader("Performance metrics")
    st.image('data/backtest main.png')

with backtest:
    st.subheader("Dessert first")
    st.markdown(""" This is the text

# %%

From the docs:

If changes to .streamlit/config.toml are made while the app is running, the server needs to be restarted for changes to be reflected in the app.


Thanks for taking the time to look at my issue. However, I have checked the docs and I have read this. So this is not the issue. It still remains on dark theme even after restarting the server. I have made our repo public for a while so you could have a look at our repo.

The link tho the app:
streamlit application

The link to to our repo
repo link

In our root repo named sysinv, the streamlit application is in the folder streamlit_template.
This folder contains the script named and the config.toml file is in the .streamlit folder which is placed in streamlit_template folder also.

Really appreciate your help.


must be in the root folder of the github repo, not relative to the streamlit app.


Wow, so sorry. So easy to look over things when you are just starting out. You guys are awesome!. This solved it of course. Thanks! :100:

PS: Let’s say we create 5 apps in one repo (our root repo on GitHub where all our projects are). So we can’t set themes separately for each app unless we make a root repo for each app with each of its own .streamlit folder and config.toml file?
Thanks again!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.