My app that I deployed on Streamlit Community cloud ‘greys’ out after I ask a follow-up question to the chatbot then it outputs on top of my previous output instead of below like a normal chatbot. Is there a way I can fix this?
The grey effect is what we call “stale.” On a Streamlit rerun, everything from the previous run becomes “stale” until it is rewritten in the next run. If your app page loads quickly, you likely won’t notice this effect, however, if you have a slow process that occurs before the previously displayed elements are rewritten, it is much more apparent.
- Use containers and empties to clear out content that you don’t want to rerender.
- Use caching to avoid recomputing long processes.
- Use containers to write content in an order where a longer process runs after the existing content is re-displayed.
- Use fragments to avoid re-displaying content.
For example, make sure the display of existing history happens before waiting for threads. Also, put your chat processing into a fragment so that you can incrementally display the new information and only rerun the whole page (and rewrite the whole history) in fewer instances.

