jaleesahmed commited on
Commit
a1538d2
·
1 Parent(s): 4071a95
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -40,13 +40,19 @@ def outbreak(plot_type):
40
  return fig
41
  if plot_type == "Business Travel vs Attrition":
42
  fig = plt.figure()
43
- ax = sns.countplot(x="Business Travel vs Attrition [0: No travel, 1: Travel Frequently, 2: Travel Rarely]", hue="Attrition", data=data_encoded)
 
 
 
 
 
 
44
  for p in ax.patches:
45
  ax.annotate('{}'.format(p.get_height()), (p.get_x(), p.get_height()+1))
46
  return fig
47
 
48
  inputs = [
49
- gr.Dropdown(["Find Data Correlation", "Filter Correlation Data", "Business Travel vs Attrition", "Age vs Attrition",], label="Data Correlation and Visualization")
50
  ]
51
 
52
  outputs = gr.Plot()
 
40
  return fig
41
  if plot_type == "Business Travel vs Attrition":
42
  fig = plt.figure()
43
+ ax = sns.countplot(x="BusinessTravel", hue="Attrition", data=data_encoded)
44
+ for p in ax.patches:
45
+ ax.annotate('{}'.format(p.get_height()), (p.get_x(), p.get_height()+1))
46
+ return fig
47
+ if plot_type == "Employee Experience vs Attrition":
48
+ fig = plt.figure()
49
+ ax = sns.countplot(x="EmployeeExperience", hue="Attrition", data=data_encoded)
50
  for p in ax.patches:
51
  ax.annotate('{}'.format(p.get_height()), (p.get_x(), p.get_height()+1))
52
  return fig
53
 
54
  inputs = [
55
+ gr.Dropdown(["Find Data Correlation", "Filter Correlation Data", "Business Travel vs Attrition", "Employee Experience vs Attrition", "Age vs Attrition",], label="Data Correlation and Visualization")
56
  ]
57
 
58
  outputs = gr.Plot()