App re running

Hi all,
I am building a chat bot on streamlit,
It has an option to upload a zip document, which unzips it and uploads to the gcs bucket and give responses on the uploaded document.
But when i am asking it for response it again processes the unzipping process and everything happens from scratch on every re render.
I tried storing it in session but isnt helping.
Any help?

Are you using Caching and state - Streamlit Docs?