harishsohani commited on
Commit
2875ff4
·
verified ·
1 Parent(s): 34c68be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -16
app.py CHANGED
@@ -48,27 +48,26 @@ st.write("Fill in the details below and click **Predict** to see if the Engine n
48
  st.markdown("""
49
  <style>
50
 
51
- /* Hide step buttons */
52
- input[type=number]::-webkit-inner-spin-button,
53
- input[type=number]::-webkit-outer-spin-button {
54
- -webkit-appearance: none;
55
- margin: 0;
56
  }
57
 
58
- input[type=number] {
59
- -moz-appearance: textfield;
 
 
 
60
  }
61
 
62
- /* Reduce input box height and padding */
63
- .stNumberInput input {
64
- height: 32px;
65
- padding: 4px 8px;
66
- font-size: 14px;
67
  }
68
 
69
- /* Reduce vertical spacing */
70
- div[data-baseweb="input"] {
71
- margin-bottom: -10px;
72
  }
73
 
74
  </style>
@@ -80,7 +79,7 @@ def formatted_number_input(title, hint, minval, maxval, defvalue, steps, valform
80
 
81
  st.markdown('<div style="margin-bottom:4px;">', unsafe_allow_html=True)
82
 
83
- col1, col2 = st.columns([2,1]) # label wider, input smaller
84
 
85
  with col1:
86
  st.markdown(f"**{title}**")
 
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>
 
79
 
80
  st.markdown('<div style="margin-bottom:4px;">', unsafe_allow_html=True)
81
 
82
+ col1, col2 = st.columns([3,1.2]) # label wider, input smaller
83
 
84
  with col1:
85
  st.markdown(f"**{title}**")