harishsohani commited on
Commit
529ed2b
·
verified ·
1 Parent(s): 48f68a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +75 -74
app.py CHANGED
@@ -67,7 +67,7 @@ def formatted_number_input(title, hint, minval, maxval, defvalue, steps, valform
67
 
68
  #user_input = float(raw)
69
  user_input = st.number_input(
70
- label=f"{title} (Suggested Range {hint})",
71
  #min_value=minval,
72
  #max_value=maxval,
73
  value=defvalue,
@@ -148,83 +148,84 @@ col_inputs, col_output = st.columns([3, 1.5])
148
  # update contnent (input) in left input column
149
  with col_inputs:
150
 
151
- st.markdown('<div class="card input-card">', unsafe_allow_html=True)
152
 
153
- st.markdown('<div class="section-title">🔧 Engine Parameters</div>', unsafe_allow_html=True)
154
 
155
-
156
- col_left, col_right = st.columns(2)
157
-
158
- # define inputs in left column
159
- with col_left:
160
-
161
- rpm = formatted_number_input(
162
- "Engine RPM",
163
- "50 to 2500",
164
- minval=50.0,
165
- maxval=2500.0,
166
- defvalue=735.0,
167
- steps=10.0,
168
- valformat="%.2f"
169
- )
170
-
171
-
172
- oil_pressure = formatted_number_input(
173
- "Lubricating oil pressure (kPa)",
174
- "0.001 to 10.0",
175
- minval=0.001,
176
- maxval=10.0,
177
- defvalue=3.300000,
178
- steps=0.001,
179
- valformat="%.6f"
180
- )
181
-
182
-
183
- fuel_pressure = formatted_number_input(
184
- "Fuel Pressure (kPa)",
185
- "0.01 to 25.0",
186
- minval=0.01,
187
- maxval=25.0,
188
- defvalue=6.500000,
189
- steps=0.01,
190
- valformat="%.6f"
191
- )
192
-
193
- # define inputs in left column
194
- with col_right:
195
- coolant_pressure = formatted_number_input(
196
- "Coolant Pressure (kPa)",
197
- "0.01 to 10.0",
198
- minval=0.01,
199
- maxval=10.0,
200
- defvalue=2.250000,
201
- steps=0.10,
202
- valformat="%.6f"
203
- )
204
-
205
-
206
- lub_oil_temp = formatted_number_input(
207
- "Lubricating oil Temperature (°C)",
208
- "50.0 to 100.0",
209
- minval=50.0,
210
- maxval=100.0,
211
- defvalue=75.0,
212
- steps=0.1,
213
- valformat="%.6f"
214
- )
215
 
 
 
 
 
216
 
217
- coolant_temp = formatted_number_input(
218
- "Coolant Temperature (°C)",
219
- "50.0 to 200.0",
220
- minval=50.0,
221
- maxval=200.0,
222
- defvalue=75.000000,
223
- steps=0.1,
224
- valformat="%.6f"
225
- )
226
-
227
- st.markdown('</div>', unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
  #st.markdown('</div>', unsafe_allow_html=True)
230
 
 
67
 
68
  #user_input = float(raw)
69
  user_input = st.number_input(
70
+ label=f"{title} ({hint})",
71
  #min_value=minval,
72
  #max_value=maxval,
73
  value=defvalue,
 
148
  # update contnent (input) in left input column
149
  with col_inputs:
150
 
151
+ #st.markdown('<div class="card input-card">', unsafe_allow_html=True)
152
 
153
+ #st.markdown('<div class="section-title">🔧 Engine Parameters</div>', unsafe_allow_html=True)
154
 
155
+ with st.expander("🔧 Engine Parameters", expanded=True):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
+ col_left, col_right = st.columns(2)
158
+
159
+ # define inputs in left column
160
+ with col_left:
161
 
162
+ rpm = formatted_number_input(
163
+ "Engine RPM",
164
+ "50 to 2500",
165
+ minval=50.0,
166
+ maxval=2500.0,
167
+ defvalue=735.0,
168
+ steps=10.0,
169
+ valformat="%.2f"
170
+ )
171
+
172
+
173
+ oil_pressure = formatted_number_input(
174
+ "Lubricating oil pressure (kPa)",
175
+ "0.001 to 10.0",
176
+ minval=0.001,
177
+ maxval=10.0,
178
+ defvalue=3.300000,
179
+ steps=0.001,
180
+ valformat="%.6f"
181
+ )
182
+
183
+
184
+ fuel_pressure = formatted_number_input(
185
+ "Fuel Pressure (kPa)",
186
+ "0.01 to 25.0",
187
+ minval=0.01,
188
+ maxval=25.0,
189
+ defvalue=6.500000,
190
+ steps=0.01,
191
+ valformat="%.6f"
192
+ )
193
+
194
+ # define inputs in left column
195
+ with col_right:
196
+ coolant_pressure = formatted_number_input(
197
+ "Coolant Pressure (kPa)",
198
+ "0.01 to 10.0",
199
+ minval=0.01,
200
+ maxval=10.0,
201
+ defvalue=2.250000,
202
+ steps=0.10,
203
+ valformat="%.6f"
204
+ )
205
+
206
+
207
+ lub_oil_temp = formatted_number_input(
208
+ "Lubricating oil Temperature (°C)",
209
+ "50.0 to 100.0",
210
+ minval=50.0,
211
+ maxval=100.0,
212
+ defvalue=75.0,
213
+ steps=0.1,
214
+ valformat="%.6f"
215
+ )
216
+
217
+
218
+ coolant_temp = formatted_number_input(
219
+ "Coolant Temperature (°C)",
220
+ "50.0 to 200.0",
221
+ minval=50.0,
222
+ maxval=200.0,
223
+ defvalue=75.000000,
224
+ steps=0.1,
225
+ valformat="%.6f"
226
+ )
227
+
228
+ #st.markdown('</div>', unsafe_allow_html=True)
229
 
230
  #st.markdown('</div>', unsafe_allow_html=True)
231