Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,37 +44,6 @@ st.write("Fill in the details below and click **Predict** to see if the Engine n
|
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
-
# Hide +/- buttons and reduce input size
|
| 48 |
-
st.markdown("""
|
| 49 |
-
<style>
|
| 50 |
-
|
| 51 |
-
/* Hide BaseWeb increment/decrement buttons */
|
| 52 |
-
div[data-baseweb="input"] button {
|
| 53 |
-
display: none !important;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
/* Reduce input height */
|
| 57 |
-
div[data-baseweb="input"] input {
|
| 58 |
-
height: 32px !important;
|
| 59 |
-
padding: 4px 8px !important;
|
| 60 |
-
font-size: 14px !important;
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
/* Reduce vertical spacing between inputs */
|
| 64 |
-
div[data-baseweb="form-control"] {
|
| 65 |
-
margin-bottom: 4px !important;
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
-
/* Reduce spacing between label and input */
|
| 69 |
-
.element-container {
|
| 70 |
-
margin-bottom: 6px !important;
|
| 71 |
-
}
|
| 72 |
-
|
| 73 |
-
</style>
|
| 74 |
-
""", unsafe_allow_html=True)
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
def formatted_number_input(title, hint, minval, maxval, defvalue, steps, valformat="%.4f"):
|
| 79 |
|
| 80 |
st.markdown('<div style="margin-bottom:4px;">', unsafe_allow_html=True)
|
|
@@ -93,12 +62,12 @@ def formatted_number_input(title, hint, minval, maxval, defvalue, steps, valform
|
|
| 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
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
def formatted_number_input(title, hint, minval, maxval, defvalue, steps, valformat="%.4f"):
|
| 48 |
|
| 49 |
st.markdown('<div style="margin-bottom:4px;">', unsafe_allow_html=True)
|
|
|
|
| 62 |
#user_input = float(raw)
|
| 63 |
user_input = st.number_input(
|
| 64 |
label=f"{title} ({hint})",
|
| 65 |
+
#min_value=minval,
|
| 66 |
+
#max_value=maxval,
|
| 67 |
value=defvalue,
|
| 68 |
+
#step=steps,
|
| 69 |
format=valformat,
|
| 70 |
+
#label_visibility="collapsed"
|
| 71 |
)
|
| 72 |
|
| 73 |
return user_input
|