Hi ,
straight to the point , when I use st.selectbox in ( if ) condition to get input from the user , True and False conditions show up for some of the inputs .
here is the web app link :
https://share.streamlit.io/artisticov/ultimate-regression-web-app/main/main.py
Hi @ARTiSticov, welcome to the Streamlit community!!
It looks like youβre accidentally using the ==
comparison operator in place of the =
assignment operator in lines 89, 93, 101, 120, 124, 126, and 128.
For example: if a user selects Wagon
from the dropdown for carbody, the following block is executed next:
elif user_inp4 == "Wagon":
user_input4 == 4
As youβve previously set user_input4 = 3
in line 83, Python checks if 3 == 4
and returns False
.
Let us know if this helps
Happy Streamlit-ing!
Snehan
1 Like