harishsohani commited on
Commit
05c1b8b
·
verified ·
1 Parent(s): b842ab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
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