Thanks for the respone! I’ve been able to fix my problem using the session states, I’m guessing this is the best way to do it?
What I wanted originally is to have a button that will trigger a job, but that button should stay in the
False state until it is clicked. Once it is clicked, it will trigger the job, but only once and never again.
I’m not able to get a proper MWE of the example but this as close as I can get:
from Streamlit.Entity_Resolution import prepare_sample
import streamlit as st
st.write('On startup, button state should be false')
# Some other buttons and widgets
Streamlit version: 0.84.1
The trigger I only want to run once. I suspect because of the way it is imported it runs the trigger right off the bat even though the button state might be
False. I read somewhere in the documentation that streamlit re-runs the script from top to bottom each time a widget is changed and so this can explain why this implementation of the button would result in constant triggering.