How to disable warning message when starting as Python script

Hi Streamlit community!

For my master thesis, I have been building a large optimization model of the European electricity grid with Streamlit. The app works absolutely great, and it makes it super easy to change some input parameters and run it again.

However, besides the web app I also need to make a CLI version of the program, so it can be run on a high-performance computer at my university. Building the command line interface was trivial, but every time I run it I get this warning message. Is there any way to disable this message?

Thank you in advance! :smiley:

  Warning: to view this Streamlit app on a browser, run it with the following
  command:

    streamlit run cli.py [ARGUMENTS]

Hi @Ruben,

Thanks for posting!

You can toggle the warning by setting showWarningOnDirectExecution = false.

:thread: Related thread: How to suppress warning during direct python running?

Caroline :balloon: