an app that disables a button while processing
Drop files here
or click to upload
import streamlit as st
import time
if 'run_button' in st.session_state and st.session_state.run_button == True:
st.session_state.running = True
else:
st.session_state.running = False
if st.button('Do a thing', disabled=st.session_state.running, key='run_button'):
status = st.progress(0)
for t in range(10):
time.sleep(.2)
status.progress(10*t+10)
st.experimental_rerun()
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?