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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -35,15 +35,15 @@ 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. '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(
@@ -53,11 +53,11 @@ with st.form("input_form"):
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
 
@@ -65,7 +65,7 @@ with st.form("input_form"):
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
 
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(
 
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
 
 
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