Rerun

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":
    mensaje_intro()
else:
    st.session_state["inicio"] = "si"

...
if st.button('Iniciar consulta',key="empezar", type="primary"):
    st.session_state["empezar_boton"]="none"

if st.session_state["empezar_boton"] == "none":
    st.markdown("""
        <style>
            button[kind="primary"]{
                display: none;
            }
            
        </style>
        """, 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,
Chanin