Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,9 @@ explainer = shap.Explainer(loaded_model) # PLEASE DO NOT CHANGE THIS.
|
|
14 |
|
15 |
# Create the main function for server
|
16 |
def main_func(Target, Admission_grade, Curricular_units_2nd_sem_(grade), Previous_qualifications, Curricular_units_1st_sem_(grade), Curricular_units_2nd_sem_(approved), Age_at_enrollment):
|
17 |
-
new_row = pd.DataFrame.from_dict({'Target':Target,'Curricular units 2nd sem (grade)':
|
18 |
-
'Previous qualifications':
|
19 |
-
'Age at enrollment':
|
20 |
|
21 |
prob = loaded_model.predict_proba(new_row)
|
22 |
|
|
|
14 |
|
15 |
# Create the main function for server
|
16 |
def main_func(Target, Admission_grade, Curricular_units_2nd_sem_(grade), Previous_qualifications, Curricular_units_1st_sem_(grade), Curricular_units_2nd_sem_(approved), Age_at_enrollment):
|
17 |
+
new_row = pd.DataFrame.from_dict({'Target':Target,'Curricular units 2nd sem (grade)':Curricular_units_2nd_sem_(grade),
|
18 |
+
'Previous qualifications':Previous_qualifications,'Curricular units 1st sem (grade)':Curricular_units_1st_sem_(grade),'Curricular units 2nd sem (approved)':Curricular_units_2nd_sem_(approved),
|
19 |
+
'Age at enrollment':Age_at_enrollmentenrollment).transpose()
|
20 |
|
21 |
prob = loaded_model.predict_proba(new_row)
|
22 |
|