Skip to content

Commit 05abb75

Browse files
committed
sliders now accept floats
1 parent b300e91 commit 05abb75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
"Doubling Time (days)", value=6, step=1, format="%i"
3333
)
3434
hosp_rate = (
35-
st.sidebar.number_input("Hospitalization %", 0, 100, value=5, step=1, format="%i")
35+
st.sidebar.number_input("Hospitalization %", 0.0, 100.0, value=5.0, step=1.0, format="%f")
3636
/ 100.0
3737
)
3838
icu_rate = (
39-
st.sidebar.number_input("ICU %", 0, 100, value=2, step=1, format="%i") / 100.0
39+
st.sidebar.number_input("ICU %", 0.0, 100.0, value=2.0, step=1.0, format="%f") / 100.0
4040
)
4141
vent_rate = (
42-
st.sidebar.number_input("Ventilated %", 0, 100, value=1, step=1, format="%i")
42+
st.sidebar.number_input("Ventilated %", 0.0, 100.0, value=1.0, step=1.0, format="%f")
4343
/ 100.0
4444
)
4545
hosp_los = st.sidebar.number_input("Hospital LOS", value=7, step=1, format="%i")

0 commit comments

Comments
 (0)