Just to add: cilent.toolbarMode="viewer" will achieve the typical view of a deployed app, removing only the developer options. The default is “auto” which tries to switch between “developer” and “viewer” based on how the app is accessed. Using localhost to access your app defaults to showing the Deploy button.
# Change the visibility of items in the toolbar, options menu,
# and settings dialog (top right of the app).
# Allowed values:
# * "auto" : Show the developer options if the app is accessed through
# localhost or through Streamlit Community Cloud as a developer.
# Hide them otherwise.
# * "developer" : Show the developer options.
# * "viewer" : Hide the developer options.
# * "minimal" : Show only options set externally (e.g. through
# Streamlit Community Cloud) or through st.set_page_config.
# If there are no options left, hide the menu.
# Default: "auto"
toolbarMode = "auto"