Spaces:
Runtime error
Runtime error
gaspar-avit
commited on
Commit
•
90f031d
1
Parent(s):
60319f9
Upload app.py
Browse files
app.py
CHANGED
@@ -199,19 +199,15 @@ def generate_prediction(input_data):
|
|
199 |
-return: predicted probability of having a cardiovascular disease
|
200 |
"""
|
201 |
# prediction = MODEL.predict(input_data)
|
202 |
-
proba = MODEL.predict_proba(input_data)
|
203 |
-
|
204 |
-
|
205 |
-
st.write(proba.shape)
|
206 |
-
|
207 |
-
'''
|
208 |
-
positive_proba = round(proba[1]*100)
|
209 |
st.markdown(f"<h1 style='text-align: center; color: grey;'>\
|
210 |
{positive_proba}</h1>",
|
211 |
unsafe_allow_html=True)
|
212 |
st.progress(positive_proba,
|
213 |
text='predicted cardiovascular disease probability.')
|
214 |
-
|
215 |
return proba
|
216 |
|
217 |
|
|
|
199 |
-return: predicted probability of having a cardiovascular disease
|
200 |
"""
|
201 |
# prediction = MODEL.predict(input_data)
|
202 |
+
proba = MODEL.predict_proba(input_data)
|
203 |
+
positive_proba = round(proba[0,1]*100)
|
204 |
+
|
|
|
|
|
|
|
|
|
205 |
st.markdown(f"<h1 style='text-align: center; color: grey;'>\
|
206 |
{positive_proba}</h1>",
|
207 |
unsafe_allow_html=True)
|
208 |
st.progress(positive_proba,
|
209 |
text='predicted cardiovascular disease probability.')
|
210 |
+
|
211 |
return proba
|
212 |
|
213 |
|