I am struggling to introduce st.write inside a function that creates a bridge plot.
I have a function that returns a plotly object, and if some parameters are correct, it prints a statement as well(coded inside the function).
Then, I assign the result to a variable and I call this variable as a plotly graph.
When I call st.plotly_chart(bridge), it returns my statement printed twice and the graphic. I want it printed only one time… It is working fine in a Jupyter Notebook but I can’t achieve it with Streamlit. Do someone know why it is happening and how to solve it?
Thank you so much!