Zeyadd-Mostaffa commited on
Commit
2d5fce6
·
verified ·
1 Parent(s): b444f01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -37,18 +37,17 @@ def predict_employee_status(satisfaction_level, last_evaluation, number_project,
37
  if department in departments:
38
  department_features[f"department_{department}"] = 1
39
 
40
- # Prepare the input with all 18 features as a DataFrame with column names
41
  input_data = {
42
  "satisfaction_level": [satisfaction_level],
43
  "last_evaluation": [last_evaluation],
44
  "number_project": [number_project],
45
- "average_montly_hours": [average_monthly_hours],
46
  "time_spend_company": [time_spent_company],
47
  "Work_accident": [work_accident],
48
  "promotion_last_5years": [promotion_last_5years],
49
  "salary": [salary],
50
- **department_features,
51
- "satisfaction_evaluation": [satisfaction_level * last_evaluation]
52
  }
53
 
54
  input_df = pd.DataFrame(input_data)
 
37
  if department in departments:
38
  department_features[f"department_{department}"] = 1
39
 
40
+ # Prepare the input with all 17 features as a DataFrame with column names
41
  input_data = {
42
  "satisfaction_level": [satisfaction_level],
43
  "last_evaluation": [last_evaluation],
44
  "number_project": [number_project],
45
+ "average_monthly_hours": [average_monthly_hours],
46
  "time_spend_company": [time_spent_company],
47
  "Work_accident": [work_accident],
48
  "promotion_last_5years": [promotion_last_5years],
49
  "salary": [salary],
50
+ **department_features
 
51
  }
52
 
53
  input_df = pd.DataFrame(input_data)