Spaces:
Build error
Build error
Commit
·
33eb9ba
1
Parent(s):
135c0af
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,10 @@ explainer = shap.Explainer(loaded_model) # PLEASE DO NOT CHANGE THIS.
|
|
| 14 |
|
| 15 |
# Create the main function for server
|
| 16 |
def main_func(age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall):
|
| 17 |
-
new_row = pd.DataFrame.from_dict({'
|
| 18 |
-
'
|
| 19 |
-
'
|
|
|
|
| 20 |
|
| 21 |
prob = loaded_model.predict_proba(new_row)
|
| 22 |
|
|
|
|
| 14 |
|
| 15 |
# Create the main function for server
|
| 16 |
def main_func(age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall):
|
| 17 |
+
new_row = pd.DataFrame.from_dict({'age':age,'sex':sex,
|
| 18 |
+
'cp':cp,'trtbps':trtbps,'chol':chol,
|
| 19 |
+
'fbs':fbs, 'restecg':restecg, 'thalachh':thalachh, 'exng':exng, 'oldpeak': oldpeak, 'slp':slp, 'caa':caa, 'thall':thall},
|
| 20 |
+
orient = 'index').transpose()
|
| 21 |
|
| 22 |
prob = loaded_model.predict_proba(new_row)
|
| 23 |
|