Check if run local or at share.streamlit.io

How can I check if my script is runnig local or at share.streamlit.io ??

1 Like

You could distinguish it by characteristics e.g. with platform or the (public) ip address or something else…

For example platform.processor() returns nothing on streamlit sharing but should return something on a local computer.

3 Likes