Is there a way to ask the user “Do you really, really, wanna do this?”, before removing all the generated data and start from scratch? Like a popup window that opens up under certain conditions?
Hey @Soren !
The Modal / Popup window I believe is being discussed internally as part of future Streamlit layout options (you can track the issue here), so no release date yet for this
You can try and display a huge warning message with
st.error and a button underneath which runs the expensive function on click:
st.error("Do you really, really, wanna do this?") if st.button("Yes I'm ready to rumble"): run_expensive_function()