Search code examples
pythonherokustreamlit

How to change the name of the streamlit app page?


I have a web application deployed to Heroku. In the address line of the application, the name of the running file and the designation of the streamlit. How can I change this line with integer. Maybe you need to add some kind of configuration file?

I need to change the line "dashboard . Strealit"

enter image description here

Additionally, I ran into the fact that I have no application theme settings. How can I enable them?

enter image description here

There is also a question about configuration files. They are located along the path: /.streamlit/ but if I place the code on GitHUB, then where should these files be located, in particular the file config.toml??


Solution

  • A few questions here. To change your page name, you can set that a the beginning of your app code with:

    st.set_page_config(
            page_title="My Page Title",
    )
    

    Streamlit theming was added in a recent update. To update your version and see the theme in the settings, you can run:

    pip install streamlit --upgrade

    and make sure to save the new version number in your requirements.txt.

    Your're right, the config.toml file should be located inside a directory called .streamlit at the root of your app. You would need to commit that directory to your Github repo along with the rest of your files. Other config files, like editor configs, .gitignore, etc should be at the root of your project as well and can be committed with everything else.