Trouble deploying theme on Streamlit Sharing but not locally

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! :wave:

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! :balloon:
Snehan

Thanks Snehan!

1 Like