Rathapoom commited on
Commit
5edba5d
·
verified ·
1 Parent(s): 20ec65f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -187,6 +187,11 @@ def select_medications():
187
  def main():
188
  st.title("BMD and T-score Prediction Tool")
189
 
 
 
 
 
 
190
  # DEXA Machine Selection
191
  dexa_machine = st.selectbox("DEXA Machine", ["LUNAR"])
192
 
@@ -211,8 +216,15 @@ def main():
211
  format="%.3f"
212
  )
213
 
 
 
 
 
 
 
 
214
  # Medication Selection
215
- selected_medications = select_medications() # Ensure this is only called once
216
 
217
  # Load constants and medication data
218
  medication_data = load_medication_data()
@@ -226,13 +238,12 @@ def main():
226
  if not filtered_predictions:
227
  st.warning("No medications selected. Please select at least one medication or use the 'Show All' option.")
228
  else:
229
- # Generate and display goal treatment summary
230
- goal_summary = generate_goal_summary(filtered_predictions, target_tscore=-2.4)
231
  display_goal_summary(goal_summary)
232
 
233
  # Display individual medication results
234
  display_results(filtered_predictions, selected_site)
235
 
236
-
237
  if __name__ == "__main__":
238
  main()
 
187
  def main():
188
  st.title("BMD and T-score Prediction Tool")
189
 
190
+ # Add a descriptive line for the tool
191
+ st.markdown(
192
+ "### A tool for initiating and evaluating osteoporosis treatment to achieve individualized T-score goals."
193
+ )
194
+
195
  # DEXA Machine Selection
196
  dexa_machine = st.selectbox("DEXA Machine", ["LUNAR"])
197
 
 
216
  format="%.3f"
217
  )
218
 
219
+ # Input for personalized T-score goal
220
+ treatment_goal_tscore = st.number_input(
221
+ "Targeted T-score Goal (default: -2.4):",
222
+ min_value=-2.4, max_value=-1.0, step=0.1, value=-2.4,
223
+ format="%.1f"
224
+ )
225
+
226
  # Medication Selection
227
+ selected_medications = select_medications()
228
 
229
  # Load constants and medication data
230
  medication_data = load_medication_data()
 
238
  if not filtered_predictions:
239
  st.warning("No medications selected. Please select at least one medication or use the 'Show All' option.")
240
  else:
241
+ # Generate and display goal treatment summary using the specified T-score goal
242
+ goal_summary = generate_goal_summary(filtered_predictions, target_tscore=treatment_goal_tscore)
243
  display_goal_summary(goal_summary)
244
 
245
  # Display individual medication results
246
  display_results(filtered_predictions, selected_site)
247
 
 
248
  if __name__ == "__main__":
249
  main()