Spaces:
Build error
Build error
Commit
·
656eea8
1
Parent(s):
3b82c0e
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ loaded_model = pickle.load(open("XGBclf_v0.2.sav", 'rb'))
|
|
13 |
explainer = shap.Explainer(loaded_model) # PLEASE DO NOT CHANGE THIS.
|
14 |
|
15 |
# Create the main function for server
|
16 |
-
def main_func(
|
17 |
new_row = pd.DataFrame.from_dict({'Management':Management,'EmployeeWellBeing':EmployeeWellBeing,
|
18 |
'EngagedAtWork':EngagedAtWork,'WorkEnvironment':WorkEnvironment,'JobSatisfaction':JobSatisfaction,
|
19 |
}, orient = 'index').transpose()
|
@@ -62,7 +62,7 @@ with gr.Blocks(title=title) as demo:
|
|
62 |
|
63 |
submit_btn.click(
|
64 |
main_func,
|
65 |
-
[
|
66 |
[label,local_plot], api_name="Employee_Turnover"
|
67 |
)
|
68 |
|
|
|
13 |
explainer = shap.Explainer(loaded_model) # PLEASE DO NOT CHANGE THIS.
|
14 |
|
15 |
# Create the main function for server
|
16 |
+
def main_func(Management,EmployeeWellBeing,EngagedAtWork,WorkEnvironment,JobSatisfaction):
|
17 |
new_row = pd.DataFrame.from_dict({'Management':Management,'EmployeeWellBeing':EmployeeWellBeing,
|
18 |
'EngagedAtWork':EngagedAtWork,'WorkEnvironment':WorkEnvironment,'JobSatisfaction':JobSatisfaction,
|
19 |
}, orient = 'index').transpose()
|
|
|
62 |
|
63 |
submit_btn.click(
|
64 |
main_func,
|
65 |
+
[Management,EmployeeWellBeing,EngagedAtWork,WorkEnvironment,JobSatisfaction],
|
66 |
[label,local_plot], api_name="Employee_Turnover"
|
67 |
)
|
68 |
|