Remove Output Names from file_uploader

Hi!,
I’m using file_uploader to let the user upload files. Once the files are uploaded, I want to get rid of the names of the files uploaded shown under the widget. So, how can I either:

  • refresh the page
  • refresh the widget to clear the names of the files that have been uploaded

Thank you!!

This should help:

uploaded_file = st.file_uploader("Choose a file")

if uploaded_file:
    st.markdown('Upload complete!')
    # Hide filename on UI
    st.markdown('''
        <style>
            .uploadedFile {display: none}
        <style>''',
        unsafe_allow_html=True)