an app that disables a button while processing
Drop files here
or click to upload
import streamlit as st
import time
st.title("Disable Button While Processing")
if st.button("Process Data", key="process_button"):
st.write("Processing...")
# Disable the button and show loading
disabled_placeholder = st.empty()
# Simulate a long process
time.sleep(5) # Simulating processing time
# Clear the placeholder (button is no longer disabled after processing)
disabled_placeholder.empty()
st.write("Processing complete!")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?