Brain_Tumor_Yolo / test.py
davron04's picture
test
1d9eccd
raw
history blame
386 Bytes
import streamlit as st
# Initialize session state
if "show_button" not in st.session_state:
st.session_state.show_button = True
# Function to hide the button
def hide_button():
st.session_state.show_button = False
st.title("Dynamic Button in Streamlit")
# Conditionally display button
if st.session_state.show_button:
if st.button("Click to Hide"):
hide_button()