Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,27 +79,27 @@ def formatted_number_input(title, hint, minval, maxval, defvalue, steps, valform
|
|
| 79 |
|
| 80 |
st.markdown('<div style="margin-bottom:4px;">', unsafe_allow_html=True)
|
| 81 |
|
| 82 |
-
st.markdown(f"**{title}**")
|
| 83 |
-
st.caption(hint)
|
| 84 |
|
| 85 |
-
decimals=6
|
| 86 |
|
| 87 |
-
raw = st.text_input(
|
| 88 |
-
label="",
|
| 89 |
-
value=f"{defvalue:.{decimals}f}",
|
| 90 |
-
label_visibility="collapsed"
|
| 91 |
-
)
|
| 92 |
-
|
| 93 |
-
user_input = float(raw)
|
| 94 |
-
#user_input = st.number_input(
|
| 95 |
-
# label="",
|
| 96 |
-
# min_value=minval,
|
| 97 |
-
# max_value=maxval,
|
| 98 |
-
# value=defvalue,
|
| 99 |
-
# step=steps,
|
| 100 |
-
# format=valformat,
|
| 101 |
-
# label_visibility="collapsed"
|
| 102 |
#)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
return user_input
|
| 105 |
|
|
|
|
| 79 |
|
| 80 |
st.markdown('<div style="margin-bottom:4px;">', unsafe_allow_html=True)
|
| 81 |
|
| 82 |
+
#st.markdown(f"**{title}**")
|
| 83 |
+
#st.caption(hint)
|
| 84 |
|
| 85 |
+
#decimals=6
|
| 86 |
|
| 87 |
+
#raw = st.text_input(
|
| 88 |
+
#label="",
|
| 89 |
+
#value=f"{defvalue:.{decimals}f}",
|
| 90 |
+
#label_visibility="collapsed"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
#)
|
| 92 |
+
|
| 93 |
+
#user_input = float(raw)
|
| 94 |
+
user_input = st.number_input(
|
| 95 |
+
label=f"{title} ({hint})",
|
| 96 |
+
min_value=minval,
|
| 97 |
+
max_value=maxval,
|
| 98 |
+
value=defvalue,
|
| 99 |
+
step=steps,
|
| 100 |
+
format=valformat,
|
| 101 |
+
label_visibility="collapsed"
|
| 102 |
+
)
|
| 103 |
|
| 104 |
return user_input
|
| 105 |
|