Showing a gif while st.spinner runs?

I would like to show an animation while my model runs.
What would you suggest I should do to implement this?

start_execution = st.button('Run model')
if start_execution:
    gif_runner = st.image(gif_path)
    result = run_model(args)
    gif_runner.empty()
    display_output(result)
3 Likes

Woah, that’s a terrific solution. Although I was thinking something more like an overlay and not an streamlit.image, because now it messses up the position of the components below.

Would placeholders help me solve them? Is it possible to show this as an overlay by using HTML or javascript?

Thanks a lot!!