Parthebhan commited on
Commit
d959f48
·
verified ·
1 Parent(s): 0963231

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -6,11 +6,7 @@ with open('./salifort_rf3.pickle', 'rb') as file:
6
  model = pickle.load(file)
7
 
8
  # Define the function for making predictions
9
- def salifort('last_evaluation', 'number_project', 'tenure', 'work_accident',
10
- 'promotion_last_5years', 'salary', 'department_IT', 'department_RandD',
11
- 'department_accounting', 'department_hr', 'department_management',
12
- 'department_marketing', 'department_product_mng', 'department_sales',
13
- 'department_support', 'department_technical', 'overworked'):
14
  inputs = [['last_evaluation', 'number_project', 'tenure', 'work_accident',
15
  'promotion_last_5years', 'salary', 'department_IT', 'department_RandD',
16
  'department_accounting', 'department_hr', 'department_management',
@@ -41,7 +37,13 @@ salifort_ga = gr.Interface(fn=salifort,
41
  gr.Number(0, 1, label="department_technical: [0 1]"),
42
  gr.Number(0, 1, label="overworked: [0 1]")
43
  ]
44
- outputs="text", title="Data-driven suggestions for HR - Salifort Motors - Employee Retention",
 
 
 
 
 
 
45
  description="Employee Retention Prediction Using Machine Learning",
46
  theme='dark'
47
  )
 
6
  model = pickle.load(file)
7
 
8
  # Define the function for making predictions
9
+ def salifort(last_evaluation, number_project, tenure, work_accident, promotion_last_5years, salary, department_IT, department_RandD, department_accounting, department_hr, department_management, department_marketing, department_product_mng, department_sales, department_support, department_technical, overworked):
 
 
 
 
10
  inputs = [['last_evaluation', 'number_project', 'tenure', 'work_accident',
11
  'promotion_last_5years', 'salary', 'department_IT', 'department_RandD',
12
  'department_accounting', 'department_hr', 'department_management',
 
37
  gr.Number(0, 1, label="department_technical: [0 1]"),
38
  gr.Number(0, 1, label="overworked: [0 1]")
39
  ]
40
+ outputs = "text", title="Data-driven suggestions for HR - Salifort Motors - Employee Retention",
41
+ examples = [
42
+ [0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
43
+ [0, 3, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1],
44
+ [0, 2, 3, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
45
+ [0, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1]
46
+ ],
47
  description="Employee Retention Prediction Using Machine Learning",
48
  theme='dark'
49
  )