riri-soltan-99
commited on
Commit
•
db93dde
1
Parent(s):
a19ab95
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ sex = st.selectbox("Sex", ["Male", "Female"])
|
|
17 |
chest_pain = st.selectbox("Chest Pain", ["Typical Angina", "Atypical Angina", "Non-Anginal pain", "Asymptomatic"])
|
18 |
Max_heartrate_achieved = st.number_input("Maximum Heartrate Achieved ")
|
19 |
Exercice_angina = st.selectbox("Exercise Induced Angina", ["Yes", "No"])
|
|
|
20 |
slop = st.selectbox("Slope of the peak exercise ST segment", ["Unsloping", "flat", "Downsloping"])
|
21 |
nb_vessels = st.selectbox("Number of major vessels", ["0", "1", "2", "3"])
|
22 |
thal = st.selectbox("Thalassemia", ["Null", "Fixed defect", "Normal", "Reversible defect"])
|
@@ -31,7 +32,7 @@ if st.button("Predict"):
|
|
31 |
nb_vessels = 0 if nb_vessels == "0" else 1 if nb_vessels == "1" else 2 if nb_vessels == "2" else 3
|
32 |
thal = 0 if thal == "Null" else 1 if thal == "Fixed defect" else 2 if thal == "Normal" else 3 if thal == "Reversible defect" else 0
|
33 |
|
34 |
-
input_data = np.array([[sex, chest_pain, Max_heartrate_achieved, Exercice_angina, slop, nb_vessels, thal]])
|
35 |
|
36 |
# Make a prediction on the user input
|
37 |
prediction = loaded_xgb_model.predict(input_data)
|
|
|
17 |
chest_pain = st.selectbox("Chest Pain", ["Typical Angina", "Atypical Angina", "Non-Anginal pain", "Asymptomatic"])
|
18 |
Max_heartrate_achieved = st.number_input("Maximum Heartrate Achieved ")
|
19 |
Exercice_angina = st.selectbox("Exercise Induced Angina", ["Yes", "No"])
|
20 |
+
oldpeak = st.number_input("oldpeak")
|
21 |
slop = st.selectbox("Slope of the peak exercise ST segment", ["Unsloping", "flat", "Downsloping"])
|
22 |
nb_vessels = st.selectbox("Number of major vessels", ["0", "1", "2", "3"])
|
23 |
thal = st.selectbox("Thalassemia", ["Null", "Fixed defect", "Normal", "Reversible defect"])
|
|
|
32 |
nb_vessels = 0 if nb_vessels == "0" else 1 if nb_vessels == "1" else 2 if nb_vessels == "2" else 3
|
33 |
thal = 0 if thal == "Null" else 1 if thal == "Fixed defect" else 2 if thal == "Normal" else 3 if thal == "Reversible defect" else 0
|
34 |
|
35 |
+
input_data = np.array([[sex, chest_pain, Max_heartrate_achieved, Exercice_angina,oldpeak, slop, nb_vessels, thal]])
|
36 |
|
37 |
# Make a prediction on the user input
|
38 |
prediction = loaded_xgb_model.predict(input_data)
|