hasbithaufik commited on
Commit
e3793b3
1 Parent(s): 7425512
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -7,7 +7,6 @@ print(st.__version__)
7
  print(pickle.format_version)
8
 
9
  st.title("EMPLOYEE ATTRITION RISK PREDICTION")
10
-
11
  st.write('Created by Hasbi Thaufik Oktodila')
12
 
13
  # Step 1 - import saved model
@@ -16,19 +15,11 @@ model = pickle.load(open("model.pkl", "rb"))
16
  st.write('Insert feature to predict')
17
 
18
  # Step 2 - prepare input data for user
19
-
20
- # jobrole = st.selectbox('Job Role', df['jobrole'].unique())
21
- # maritalstatus = st.selectbox('Marital Status', df['maritalstatus'].unique())
22
- # overtime = st.selectbox('Frequently Overtime? (Yes = 1, No = 0)', df['overtime'].unique())
23
- # businesstravel = st.selectbox('Frequently Have Business Travel? (No Travel = 1, Rarely = 2, Frequently = 3', df['businesstravel'].unique())
24
- # gender = st.selectbox('Gender (Male = 1, Female = 2)', df['gender'].unique())
25
- # hourlyrate = st.number_input('Hourly Rate', df['degree_t'].unique())
26
-
27
  jobrole = st.selectbox(label='Job Role', options=['Sales Executive', 'Laboratory Technician', 'Research Scientist', 'Manufacturing Director', 'Healthcare Representative',
28
  'Manager', 'Research Director', 'Sales Representative', 'Human Resources'])
29
  maritalstatus = st.selectbox(label='Marital Status', options=['Single', 'Married', 'Divorced'])
30
  overtime = st.selectbox(label='Frequently Overtime? (Yes = 1, No = 0)', options=[0, 1])
31
- businesstravel = st.selectbox(label='Frequently Have Business Travel? (Yes = 1, No = 0)', options=[1, 2, 3])
32
  gender = st.selectbox(label='Gender (Male = 1, Female = 2)', options=[1,2])
33
  hourlyrate = st.slider(label='Your Hourly Rate', min_value=30, max_value=100, step=1)
34
  dailyrate = st.slider(label='Your Daily Rate', min_value=100, max_value=2000)
 
7
  print(pickle.format_version)
8
 
9
  st.title("EMPLOYEE ATTRITION RISK PREDICTION")
 
10
  st.write('Created by Hasbi Thaufik Oktodila')
11
 
12
  # Step 1 - import saved model
 
15
  st.write('Insert feature to predict')
16
 
17
  # Step 2 - prepare input data for user
 
 
 
 
 
 
 
 
18
  jobrole = st.selectbox(label='Job Role', options=['Sales Executive', 'Laboratory Technician', 'Research Scientist', 'Manufacturing Director', 'Healthcare Representative',
19
  'Manager', 'Research Director', 'Sales Representative', 'Human Resources'])
20
  maritalstatus = st.selectbox(label='Marital Status', options=['Single', 'Married', 'Divorced'])
21
  overtime = st.selectbox(label='Frequently Overtime? (Yes = 1, No = 0)', options=[0, 1])
22
+ businesstravel = st.selectbox(label='Frequently Have Business Travel? (1 = Non Travel, 2 = Rarely, 3 = Frequently)', options=[1, 2, 3])
23
  gender = st.selectbox(label='Gender (Male = 1, Female = 2)', options=[1,2])
24
  hourlyrate = st.slider(label='Your Hourly Rate', min_value=30, max_value=100, step=1)
25
  dailyrate = st.slider(label='Your Daily Rate', min_value=100, max_value=2000)