How to Prevent Streamlit from Interrupting Ongoing Generation When Submitting Feedback for Previous Answers

As soon as I tried to submit a score for the previous answer, the generation of the current answer would stop immediately. This happened even though I wasn’t touching the generation logic directly. The simple act of submitting feedback interrupted the in-progress generation.

Please can you provide more information? Can you reproduce your issues with a short, executable piece of code to simulate your interrupted generation? Streamlit reruns with every interaction, so long-running processes can get cut off if the user interacts with the app. You may need to introduce logic to separate long-running processes from your script runs and just have your script run fetch completed results from a separate process.