Removing the 'deploy' button

  1. Are you running your app locally or is it deployed?
  2. If your app is deployed: no
  3. Share the link to your app’s public GitHub repository: NA
  4. Share the full text of the error message (not a screenshot).
    using the following code to suppress the header and footer:
hide_menu_style = """<style>#MainMenu {visibility: hidden;} footer {visibility: hidden;}</style>"""
st.markdown(hide_menu_style, unsafe_allow_html=True)

The hamburger and the footer went away, but the deploy button is still there. This did not happen with StreamLit 1.22
5. Share the Streamlit and Python versions.
streamlit 1.27.2 / python 3.11.2

check out this solution:

import streamlit as st

st.set_page_config(page_title="Page Title", layout="wide")

        .reportview-container {
            margin-top: -2em;
        #MainMenu {visibility: hidden;}
        .stDeployButton {display:none;}
        footer {visibility: hidden;}
        #stDecoration {display:none;}
""", unsafe_allow_html=True)

Nice trick, Tony! :raised_hands:

I tried several variations but this one seems to work most of the time.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.