NB094
October 3, 2021, 2:27am
1
Hi,
I just started using Streamlit a few days ago and since then I’ve deployed a couple apps. Problem is, while I can easily use custom themes locally using the .streamlit/config.toml method, it never seems to work on my deployed app. I’ve tried restarting the app and a couple other things.
The contents of my config file are as follows:
[theme]
base="light"
backgroundColor="#e4e3e3"
secondaryBackgroundColor="#c6ccd2"
I’ve set up my Github repo to mimic my local directories, so I’m not sure what could be going wrong. Here is a link: https://github.com/NB094/Easy-GANs/tree/main/SRGAN
Streamlit version: 0.89.0
Python version: 3.7.11
OS: Windows
Browser: Chrome
Any thoughts?
Hi @NB094 , welcome to the community!
When deploying to Streamlit Cloud, your .streamlit/config.toml should be in the root of your repo:
Once you move it to the root of the Github repo, your deployed app will detect your custom theme!
This also means that you will have to move Easy-GANs/NumberGenerator at main · NB094/Easy-GANs · GitHub and Easy-GANs/Pix2Pix at main · NB094/Easy-GANs · GitHub to their own repos if you want them to have other custom themes. If those apps use the same theme as SRGAN, a single config.toml file at the root of the repo should be sufficient.
Happy Streamlit’ing!
Snehan
Hi @snehankekre
I’m having a similar issue, but cannot really seem to solve it myself. I have my config.toml file in the .streamlit folder - but my deployed app is not picking up the theme changes. Could you help?
https://sinfulnina-my-first-project-st-app-ms8ulu.streamlitapp.com/
1 Like
Hi @NinaVistisen
If you created the config after you deployed the app, you need to reboot the app for the custom config to get picked up.
Hi @snehankekre
Perfect, worked a treat! Thanks for the quick help
1 Like
I am feeling very stupid, but can someone help me to make my theming (GitHub - victor-234/srn: Sustainability Disclosure Navigator and https://sustrep.streamlitapp.com/ ) options work? If I set up the app from scratch again, it works. But when I change the custom domain, then it reverts back the color. Any idea?
Edit: it works now, but I haven’t changed a thing…
hat1
October 24, 2022, 6:06pm
8
I have the same problem, the app still apply the theme of the system, but it can’t force the light theme as it is in the streamlit/config.toml
[theme]
base="light"
system
Closed
October 24, 2023, 6:06pm
9
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.