Hello! I have a doubt about the rerunning of code. I want to read the first part of the code again after click the button, is that possible?

This is the actual code:

if st.session_state["empezar_boton"] == "block":
    st.session_state["inicio"] = "si"

if st.button('Iniciar consulta',key="empezar", type="primary"):

if st.session_state["empezar_boton"] == "none":
                display: none;
        """, unsafe_allow_html=True)

    if st.session_state["inicio"] == "si":

Basically I have text that I want to make it disappear when someone clicks the button, if I don’t have this condition, it disappears after run all the code.

Hi @saraibaallo

Could you share a link to the GitHub repo of this app. It’s difficult to imagine from the code excerpt mentioned in the question. It would also be great to add comments directly to the code on which part that you want to re-appear again after clicking on a button.

Best regards,

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.