You should wrap the loading of model/pipeline and add a streamlit.cache decorator. That way, the loading/downloading part will be done only once.
https://docs.streamlit.io/en/stable/api.html#optimize-performance 51