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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,8 +60,8 @@ def predict_employee_status(satisfaction_level, last_evaluation, number_project,
60
  dmatrix = xgb.DMatrix(input_df)
61
  prediction = model.predict(dmatrix)
62
  prediction_prob = prediction[0]
63
- result = "βœ… Employee is likely to quit." if prediction_prob > 0.5 else "βœ… Employee is likely to stay."
64
- return f"{result} (Probability: {prediction_prob:.2%})"
65
  except Exception as e:
66
  return f"❌ Error: {str(e)}"
67
 
 
60
  dmatrix = xgb.DMatrix(input_df)
61
  prediction = model.predict(dmatrix)
62
  prediction_prob = prediction[0]
63
+ result = "βœ… Employee is likely to quit." if prediction_prob > 0.3 else "βœ… Employee is likely to stay."
64
+ return f"{result}"
65
  except Exception as e:
66
  return f"❌ Error: {str(e)}"
67