一、 How does one hide the the file_uploader in streamlit after the image is loaded?
with col2:
st.header('Bottom Glass Image')
holder = st.empty()
bottom_image = holder.file_uploader('Choose Bottom Glass Image', type='jpg', key=2)
if bottom_image is not None:
st.image(load_image(bottom_image), width=200)
holder.empty()
三、参考文献
- https://zhuanlan.zhihu.com/p/163927661
- https://docs.streamlit.io/library/api-reference/layout/st.empty
- https://stackoverflow.com/questions/71789004/how-does-one-hide-the-the-file-uploader-in-streamlit-after-the-image-is-loaded