Streamlit multi page app deployed on Heroku uses the same image for all the pages

My streamlit app is a multi page app, each having an image classifier. Before deploying it on Heroku, the app worked fine locally, it required an input image seperately for each page when we open that page for the first time after launching.
When I upload an image to any one page, the same image is automatically uploaded to other pages and the respective results are displayed on each page when I dont even want that. This problem is only happening after deploying on heroku. Can someone help please?

Hi @AmoghJ001, welcome to the Streamlit community!

Can you provide the code for what you are doing and/or the URL of your heroku app? It’s not clear what your app structure is/what the issue might be.


Hi! Well I figured out a solution to this myself. There were multiple pages in my app, each page having a file_uploader. When a file was getting uploaded to any one page, the same file was automatically getting uploaded to all other pages. This issue was solved by adding the ‘key argument’ to file uploader. I set a different key for each file uploader and it worked!
PS: Really love streamlit and the prompt response of your team! Keep it up!

1 Like