How to hide st.image

I need to add a loading image until I get the data from the model, so after that, I need to hide it.
How to hide st.image?

I tried the following, but it didn’t work, the image is still there:

placeholder= st.image('loading4.gif')
#call mode
placeholder = st.empty()

I’ve just found why it didn;t work.
I have to do the following:


instead of

placeholder = st.empty()

1 Like