How to remove uploaded_file after navigating to other tabs in Streamlit?

I have a Streamlit app with multiple tabs.

How do I immediately remove an uploaded_file after navigating to other tabs in Streamlit

Currently the uploaded file remains in the session state for some time even as I navigate to other tabs, before removing the image after some time

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.