About slider

I am using the slider with the help of st.slider st.slider(‘select the threshold’, 0.0, 2.0, 0.01)
here 0.0 is the min value 2.0 is the max value and 0.01 is the step value.

I need 0.027 or some other value as a default value.

such that whenever i open the streamlit app the slider should be at 0.027 as a deafult.

kindly provide a suggestion for this.

The third numeric value is the default value, not the step. (But step=0.01 by default if you enter the other numbers as floats.)

You need:

st.slider('select the threshold', 0.0, 2.0, 0.27)

Or equivalently

st.slider('select the threshold', min_value=0.0, max_value=2.0, value=0.27, step=0.01)


Thank u, it worked. :smiley: