How to remove file_uploader once file has been uploaded

I have the need to upload 6 files to a streamlit app via file_uploaders but once I have these uploaded the file_uploader widgets remain in place. This takes up a lot of screen space.

If there a way to remove the widget once the data has been uploaded?


Hey did you get a fix for it ?

I could fix it. The solution is change the key attribute of the streamlit fileuploader widget.

st.fileupload(…, key=f’{key_number}’)

Be sure to change the key_number with a clear button. You’ll need to use a pickle or a streamlit state in order to save and change de key_number