Supress new browser window once app is started execution

You need to have your app run in “headless” mode. There are 4 different ways to set this configuration per this page, scroll down to the “View all config options” section. So in your case, you can create a config.toml file and add:

[server]
headless = true

or set the environment variable STREAMLIT_SERVER_HEADLESS=true
or when you run your app at the command line, you can just pass the --server.headless true parameter like so:

streamlit run your_app.py --server.headless true

To the streamlit devs:
I think the documentation can be improved by having “Configuration” menu item added on the left panel which is dedicated specifically to streamlit configuration. I can see how new users would not think to look in the “Command-line interface” menu item to find the configuration options.

2 Likes