Jegree commited on
Commit
02f5e1b
·
verified ·
1 Parent(s): f10dfc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def diabetic_pedigree_function(mother, father, siblings):
47
  sibling_weight = 0.25
48
 
49
  # Calculate the weighted contributions
50
- family_history = (mother * mother_weight) + (father * father_weight) + (sum(siblings) * sibling_weight)
51
 
52
  # Add a scaling factor to shift the range
53
  scaling_factor = 1.2
@@ -204,7 +204,7 @@ elif st.session_state.question_no == 9:
204
  st.session_state.diabeticMother = 1 if diabeticMother else 0
205
  st.session_state.diabeticFather = 1 if diabeticFather else 0
206
  st.session_state.diabeticSibling = int(diabeticSibling)
207
- st.session_state.dpf = diabetic_pedigree_function(st.session_state.diabeticMother, st.session_state.diabeticFather, st.session_state.diabeticSibling, st.session_state.diabeticSibling)
208
  st.session_state.question_no += 1
209
 
210
  elif st.session_state.question_no == 10:
 
47
  sibling_weight = 0.25
48
 
49
  # Calculate the weighted contributions
50
+ family_history = (mother * mother_weight) + (father * father_weight) + (siblings) * sibling_weight
51
 
52
  # Add a scaling factor to shift the range
53
  scaling_factor = 1.2
 
204
  st.session_state.diabeticMother = 1 if diabeticMother else 0
205
  st.session_state.diabeticFather = 1 if diabeticFather else 0
206
  st.session_state.diabeticSibling = int(diabeticSibling)
207
+ st.session_state.dpf = diabetic_pedigree_function(st.session_state.diabeticMother, st.session_state.diabeticFather, st.session_state.diabeticSibling)
208
  st.session_state.question_no += 1
209
 
210
  elif st.session_state.question_no == 10: