Shiny Python App Restarts After CSV Upload

Hi everyone! I am working on a Shiny Python web app and it's supposed to take in a file (right now, I am using a CSV file) and display a graph. The app is able to take in the file and display the graph, but when I scroll, click, or move to a different section of my app, the app shuts down and starts back up again automatically, getting rid of the graph and the file on the screen. Has anyone experienced this issue? If so, how were you able to fix it or get around it?