Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import pickle
|
3 |
import pandas as pd
|
@@ -12,12 +14,11 @@ with open(filename, 'rb') as f:
|
|
12 |
# Setup SHAP
|
13 |
explainer = shap.Explainer(loaded_model)
|
14 |
|
15 |
-
# Employee Profiles (
|
16 |
employee_profiles = {
|
17 |
-
"
|
18 |
-
"
|
19 |
-
"
|
20 |
-
"π₯ Burnt-Out Employee": [1, 2, 2, 5, 1, 1]
|
21 |
}
|
22 |
|
23 |
# Define the prediction function
|
|
|
1 |
+
# with cluster profiles
|
2 |
+
|
3 |
import gradio as gr
|
4 |
import pickle
|
5 |
import pandas as pd
|
|
|
14 |
# Setup SHAP
|
15 |
explainer = shap.Explainer(loaded_model)
|
16 |
|
17 |
+
# Employee Profiles (From SPSS 3-Cluster Solution)
|
18 |
employee_profiles = {
|
19 |
+
"π Leslie Knope": [4.716, 4.792, 4.864, 4.588, 4.849, 4.601], # Cluster group 1 averages - high engagement, strong support, high workload
|
20 |
+
"β οΈ Kevin Malone": [3.045, 3.122, 3.129, 2.886, 3.113, 2.197], # Cluster group 2 averages - disengaged, low recognition, weak support
|
21 |
+
"π± Jim Halpert": [3.885, 3.992, 4.119, 3.704, 4.090, 3.377] # Cluster group 3 averages - Moderately engaged, could be more recognized - room to grow
|
|
|
22 |
}
|
23 |
|
24 |
# Define the prediction function
|