I would like to change the value of a number_input widget later on. In my case, I ask for user input first:
D = st.number_input("Diameter", value = 6.0)
Also, I give user the option to calculate the D using some other method. However, when user uses this method, I want to change the displayed value of Diameter widget above. I connect this other method with a button so,
# other method to calculate the value of D button_D = st.button("Use other method") if button_D: #change the current value of D displayed to user.