Check if run local or at share.streamlit.io

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

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.

2 Likes