Abhisikta-26201 commited on
Commit
6f8ad6f
·
verified ·
1 Parent(s): db655ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -35,45 +35,42 @@ with st.form("input_form"):
35
  chestpain = st.selectbox(
36
  "Chest Pain Type",
37
  ['No Data Available','Non-anginal_pain', 'Typical_angina', 'Atypical_angina','Asymptomatic'],
38
- help="Select the type of chest pain",
39
  )
40
  chestpain = np.nan if chestpain == 'No Data Available' else chestpain
41
- restingBP = st.number_input("Resting Blood Pressure", min_value = (-1), max_value=300, step=1, format="%d", help="Enter the resting blood pressure (in mmHg), '-1' corresponds to unknown resting blood pressure")
42
  restingBP = np.nan if restingBP == (-1) else restingBP
43
 
44
  with col2:
45
  serum_cholesterol = st.number_input(
46
- "Serum Cholesterol", min_value=(-1), max_value=1000, step=1, format="%d", help="Enter serum cholesterol level (in mg/dL), '-1' corresponds to unknown serum choesterol level"
47
  )
48
  serum_cholesterol = np.nan if serum_cholesterol == (-1) else serum_cholesterol
49
  fasting_blood_sugar = st.radio(
50
- "Fasting Blood Sugar > 120 mg/dL", ['Yes', 'No','No Data Available'], horizontal=True, help ="Indicate if fasting blood sugar is greater than 120 mg/dL"
51
  )
52
  fasting_blood_sugar = np.nan if fasting_blood_sugar == 'No Data Available' else fasting_blood_sugar
53
  restingrelectro = st.selectbox(
54
  "Resting Electrocardiographic Results",
55
  ['No Data Available','ST-T_wave_abnormality', 'Normal', 'Left_ventricular_hypertrophy'],
56
- help="Select the resting electrocardiographic result",
57
  )
58
  restingrelectro = np.nan if restingrelectro == 'No Data Available' else restingrelectro
59
  maxheartrate = st.number_input(
60
- "Maximum Heart Rate Achieved", min_value=(-1), max_value=250, step=1, format="%d", help="Enter the maximum heart rate achieved, '-1' corresponds to unknown maximum heart rate"
61
  )
62
  maxheartrate = np.nan if maxheartrate == (-1) else maxheartrate
63
 
64
 
65
  # Second row of inputs
66
- exerciseangia = st.radio("Exercise-Induced Angina", ['Yes', 'No','No Data Available'], horizontal=True, help = "Indicate if exercise induced angina is present or not. 'Most frequent' category will be used for prediction if 'No Data Available' option is selected")
67
  exerciseangia = np.nan if exerciseangia == 'No Data Available' else exerciseangia
68
- oldpeak = st.number_input("ST Depression Induced by Exercise",min_value = (-0.1), max_value = (10) ,step = 0.1, help="Enter ST depression value induced by exercise relative to rest, any negetive input value corresponds to null value or unknown value")
69
  oldpeak = np.nan if oldpeak == (-0.1) else oldpeak
70
- slope = st.selectbox("Slope of Peak Exercise ST Segment", ['No Data Available','Downsloping', 'Upsloping', 'Flat'],help = '''The slope of the peak exercise ST segment can be categorized as upsloping, horizontal, or downsloping. A normal ST segment during exercise slopes sharply upwards.
71
- The slope of the ST segment is the shift of the ST segment relative to the increase in heart rate caused by exercise.''')
72
  slope = np.nan if slope == 'No Data Available' else slope
73
  noofmajorvessels = st.selectbox(
74
- "Number of Major Vessels", ['No Data Available','Zero', 'One', 'Two', 'Three'],help = "Fluoroscopy is a procedure used during cardiac catheterization to help doctors see blood flow through the coronary arteries.
75
- This allows doctors to evaluate for arterial blockages"
76
- )
77
  noofmajorvessels = np.nan if noofmajorvessels == 'No Data Available' else noofmajorvessels
78
 
79
  # Submit button
@@ -112,4 +109,4 @@ st.markdown(
112
  </a>'''
113
  ,
114
  unsafe_allow_html=True,
115
- )
 
35
  chestpain = st.selectbox(
36
  "Chest Pain Type",
37
  ['No Data Available','Non-anginal_pain', 'Typical_angina', 'Atypical_angina','Asymptomatic'],
38
+ help="Select the type of chest pain. 'No Data Available' corresponds to an unknown value. If selected, the 'most frequent' value of the category will be used for prediction."
39
  )
40
  chestpain = np.nan if chestpain == 'No Data Available' else chestpain
41
+ restingBP = st.number_input("Resting Blood Pressure", min_value = (-1), max_value=300, step=1, format="%d", help="Enter the resting blood pressure (in mmHg). '-1' corresponds to an unknown resting BP level. If selected, then mean value of the category will be used for prediction.")
42
  restingBP = np.nan if restingBP == (-1) else restingBP
43
 
44
  with col2:
45
  serum_cholesterol = st.number_input(
46
+ "Serum Cholesterol", min_value=(-1), max_value=1000, step=1, format="%d", help="Enter serum cholesterol level (in mg/dL). '-1' corresponds to an unknown serum choesterol level. If selected, then mean value of the category will be used for prediction."
47
  )
48
  serum_cholesterol = np.nan if serum_cholesterol == (-1) else serum_cholesterol
49
  fasting_blood_sugar = st.radio(
50
+ "Fasting Blood Sugar > 120 mg/dL", ['Yes', 'No','No Data Available'], horizontal=True, help ="Indicate if fasting blood sugar is greater than 120 mg/dL. 'No Data Available' corresponds to an unknown fasting blood sugar level. If selected, the 'most frequent' value of the category will be used for prediction."
51
  )
52
  fasting_blood_sugar = np.nan if fasting_blood_sugar == 'No Data Available' else fasting_blood_sugar
53
  restingrelectro = st.selectbox(
54
  "Resting Electrocardiographic Results",
55
  ['No Data Available','ST-T_wave_abnormality', 'Normal', 'Left_ventricular_hypertrophy'],
56
+ help="Select the resting electrocardiographic result. 'No Data Available' corresponds to an unknown ECG result. If selected, the 'most frequent' value of the category will be used for prediction."
57
  )
58
  restingrelectro = np.nan if restingrelectro == 'No Data Available' else restingrelectro
59
  maxheartrate = st.number_input(
60
+ "Maximum Heart Rate Achieved", min_value=(-1), max_value=250, step=1, format="%d", help ="Enter the maximum heart rate achieved. '-1' corresponds to an unknown maximum heart rate. If selected, then mean value of the category will be used for prediction.
61
  )
62
  maxheartrate = np.nan if maxheartrate == (-1) else maxheartrate
63
 
64
 
65
  # Second row of inputs
66
+ exerciseangia = st.radio("Exercise-Induced Angina", ['Yes', 'No','No Data Available'], horizontal=True, help = "Indicate if exercise induced angina is present or not. 'No Data Available' corresponds to an unknown value. If selected, the 'most frequent' value of the category will be used for prediction.")
67
  exerciseangia = np.nan if exerciseangia == 'No Data Available' else exerciseangia
68
+ oldpeak = st.number_input("ST Depression Induced by Exercise",min_value = (-0.1), max_value = 10 ,step = 0.1, help="Enter ST depression value induced by exercise relative to rest. '-0.1' corresponds to an unknown value. If selected, then mean value of the category will be used for prediction.")
69
  oldpeak = np.nan if oldpeak == (-0.1) else oldpeak
70
+ slope = st.selectbox("Slope of Peak Exercise ST Segment", ['No Data Available','Downsloping', 'Upsloping', 'Flat'], help = "A normal ST segment during exercise slopes sharply upwards. The slope of the ST segment is the shift of the ST segment relative to the increase in heart rate caused by exercise. 'No Data Available' corresponds to an unknown slope value. If selected, the 'most frequent' value of the category will be used for prediction.")
 
71
  slope = np.nan if slope == 'No Data Available' else slope
72
  noofmajorvessels = st.selectbox(
73
+ "Number of Major Vessels", ['No Data Available','Zero', 'One', 'Two', 'Three'],help = "Fluoroscopy is a procedure used during cardiac catheterization to help doctors see blood flow through the coronary arteries. This allows doctors to evaluate for arterial blockages.'No Data Available' corresponds to an unknown value. If selected, the 'most frequent' value of the category will be used for prediction.")
 
 
74
  noofmajorvessels = np.nan if noofmajorvessels == 'No Data Available' else noofmajorvessels
75
 
76
  # Submit button
 
109
  </a>'''
110
  ,
111
  unsafe_allow_html=True,
112
+ )