rasmodev commited on
Commit
2fa1053
·
verified ·
1 Parent(s): e4540d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- #Import Relevant Libraries
2
  import streamlit as st
3
  import pickle
4
  import pandas as pd
@@ -59,6 +59,23 @@ st.markdown(
59
  unsafe_allow_html=True
60
  )
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  # Define the Streamlit app
63
  def main():
64
  # Define layout with three columns
@@ -121,7 +138,7 @@ def main():
121
  probability = model.predict_proba(input_data)[:, 1]
122
 
123
  # Display predicted attrition status
124
- st.subheader("Predicted Attrition Status 🔮")
125
  if prediction[0] == 1:
126
  st.error("Employee is predicted to leave (Attrition = Yes)")
127
  else:
 
1
+ # Import Relevant Libraries
2
  import streamlit as st
3
  import pickle
4
  import pandas as pd
 
59
  unsafe_allow_html=True
60
  )
61
 
62
+ # Input Descriptions in Sidebar
63
+ st.sidebar.title("Input Descriptions")
64
+ st.sidebar.markdown("**Age:** Age of the employee.")
65
+ st.sidebar.markdown("**Monthly Income:** Monthly income of the employee.")
66
+ st.sidebar.markdown("**Number of Companies Worked:** Number of companies the employee has worked for.")
67
+ st.sidebar.markdown("**Percent Salary Hike:** Percentage increase in salary for the employee.")
68
+ st.sidebar.markdown("**Training Times Last Year:** Number of training sessions attended by the employee last year.")
69
+ st.sidebar.markdown("**Department:** Department the employee belongs to (Sales, Research & Development, Human Resources).")
70
+ st.sidebar.markdown("**Environment Satisfaction:** Level of satisfaction with the work environment (1: Low, 2: Medium, 3: High, 4: Very High).")
71
+ st.sidebar.markdown("**Job Role:** Job role of the employee.")
72
+ st.sidebar.markdown("**Job Satisfaction:** Level of job satisfaction (1: Low, 2: Medium, 3: High, 4: Very High).")
73
+ st.sidebar.markdown("**Work Life Balance:** Level of satisfaction with work-life balance (1: Low, 2: Medium, 3: High, 4: Very High).")
74
+ st.sidebar.markdown("**Over Time:** Whether the employee works overtime.")
75
+ st.sidebar.markdown("**Relationship Satisfaction:** Level of satisfaction with work relationships (1: Low, 2: Medium, 3: High, 4: Very High).")
76
+ st.sidebar.markdown("**Years Since Last Promotion:** Number of years since the employee's last promotion.")
77
+ st.sidebar.markdown("**Years With Current Manager:** Number of years the employee has been with the current manager.")
78
+
79
  # Define the Streamlit app
80
  def main():
81
  # Define layout with three columns
 
138
  probability = model.predict_proba(input_data)[:, 1]
139
 
140
  # Display predicted attrition status
141
+ st.subheader("Predicted Attrition Status 🎯")
142
  if prediction[0] == 1:
143
  st.error("Employee is predicted to leave (Attrition = Yes)")
144
  else: