Skip to content

Commit 7f650d9

Browse files
Merge pull request #50 from CodeForPhilly/hospitalization-icu-vent_accept-floats
sliders now accept floats
2 parents ede39e5 + 47eb571 commit 7f650d9

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
@@ -39,14 +39,14 @@
3939
)/100.0
4040

4141
hosp_rate = (
42-
st.sidebar.number_input("Hospitalization %(total infections)", 0, 100, value=5, step=1, format="%i")
42+
st.sidebar.number_input("Hospitalization %(total infections)", 0.0, 100.0, value=5.0, step=1.0, format="%f")
4343
/ 100.0
4444
)
4545
icu_rate = (
46-
st.sidebar.number_input("ICU %(total infections)", 0, 100, value=2, step=1, format="%i") / 100.0
46+
st.sidebar.number_input("ICU %(total infections)", 0.0, 100.0, value=2.0, step=1.0, format="%f") / 100.0
4747
)
4848
vent_rate = (
49-
st.sidebar.number_input("Ventilated %(total infections)", 0, 100, value=1, step=1, format="%i")
49+
st.sidebar.number_input("Ventilated %(total infections)", 0.0, 100.0, value=1.0, step=1.0, format="%f")
5050
/ 100.0
5151
)
5252
hosp_los = st.sidebar.number_input("Hospital Length of Stay", value=7, step=1, format="%i")

0 commit comments

Comments
 (0)