hsandvik00 commited on
Commit
6feeae4
Β·
verified Β·
1 Parent(s): c183965

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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 (Adjusted Top Performer)
16
  employee_profiles = {
17
- "πŸ“ˆ High Potential Employee": [4, 5, 5, 3, 4, 5],
18
- "πŸ† Top Performer": [5, 5, 5, 3, 5, 5], # Reduced workload
19
- "⚠️ At-Risk Employee": [2, 2, 2, 4, 2, 2],
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