Biggest mistake to build on Streamlit

I made the biggest mistake to build a protoype demo on Streamlit.

I have never spent so much time in getting a UX working. If I knew so much quirks in Streamlit that a decent demo can’t be built on it, I would have never used it to begin with.

Now my job has come on the line for so much delays. For last 20 days I am trying to figure issues with streamlit, and that has slowed me down immeasurably.

I have sent multiple messages here but to no avail.

I now feel so defeated and frustrated. So tired. The whole framework has so many quirks. You don’t know how to send values in call back, that doesn’t work:

Has issues in st.rerun(), whole script will run everytime on any interaction that makes it so difficult to build a meaningul interactive UX.

Feel so angry and frustrated

1 Like

Have you tried using @st.fragment to define and stabilize your app with minimal reruns, Sir?

3 Likes

I am currently stuck why the values are not getting passed by callback as I put in above link?

Taking on a critical project (you said your “job is on the line”) using a framework you’re not familiar with, is a risky thing. Ideally, you should have abandoned using Streamlit early when you found you couldn’t implement the core UI behaviours to support your use case. With some up front analysis you might have concluded that the look and feel + interactive behaviours you wanted would be hard to achieve without having quite deep knowledge of using Streamlit, or that what you can achieve would not meet the requirements of your users.

Hope you managed to keep your job in the end and you have better success with Streamlit in the future.

1 Like

Yeah, it can get a bit challenging with the reruns, and custom frontends are a pain.

Maybe take a look at some of the sample codes on github (running already on the community cloud). Or stop now, make everything into API calls and use whatever frontend you prefer.

I use Claude 3.5 in Cursor’s Composer, with Cursor referencing the Streamlit docs website. I can mostly just prompt it into writing any Streamlit apps for me just going back and forth between prompting and testing. If you are stuck, LLMs can get you where you want to go.

1 Like

@sridhim8 I was right where you were at. Unfortunately took a 2-3 months of self flagellation and heavy drinking before I could figure out the nuances that are very peculiar to running python for a front end.

I had to work through a few big road blocks that nearly made me regret it but after working through them, I’m happy I have stuck with the framework for standing up demos and prototypes

Session states are your best friend. You have to get pretty creative on how to use them sometimes like adding counters or UUIDs for comparison

1 Like