gilangw commited on
Commit
384467e
·
1 Parent(s): bab5330

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. prediction.py +17 -7
app.py CHANGED
@@ -43,10 +43,10 @@ st.set_page_config(
43
  # image = Image.open('images\logo_grey_clean.png')
44
  col1, col2, col3 = st.columns([10, 1, 5])
45
  image_url = 'https://raw.githubusercontent.com/FTDS-assignment-bay/p2-final-project-ftds-001-sby-group-001/main/images/logo_crop_clean.png'
46
- qr_url = 'https://raw.githubusercontent.com/FTDS-assignment-bay/p2-final-project-ftds-001-sby-group-001/main/images/qr_link.png'
47
  col1.image(image_url, width=450)
48
- col2.write('')
49
- col3.image(qr_url, width=150)
50
  st.write('# Customer Churn and Segmentation')
51
  st.subheader('Predict churn and retain your customer!')
52
  st.markdown('---')
 
43
  # image = Image.open('images\logo_grey_clean.png')
44
  col1, col2, col3 = st.columns([10, 1, 5])
45
  image_url = 'https://raw.githubusercontent.com/FTDS-assignment-bay/p2-final-project-ftds-001-sby-group-001/main/images/logo_crop_clean.png'
46
+ # qr_url = 'https://raw.githubusercontent.com/FTDS-assignment-bay/p2-final-project-ftds-001-sby-group-001/main/images/qr_link.png'
47
  col1.image(image_url, width=450)
48
+ # col2.write('')
49
+ # col3.image(qr_url, width=150)
50
  st.write('# Customer Churn and Segmentation')
51
  st.subheader('Predict churn and retain your customer!')
52
  st.markdown('---')
prediction.py CHANGED
@@ -101,10 +101,15 @@ def run():
101
  - High monthly charges
102
  '''
103
 
 
 
 
 
 
104
  suggestion_0 = '''
105
- - Offers packages with additional speed for 3 months for those who have subscribed for more than 3 years
106
- - Open all TV channels during big holiday events such as Eid, Christmas and others
107
- - Provide special offers to increase internet speed to them
108
  '''
109
 
110
  cluster_1 = '''
@@ -116,6 +121,7 @@ def run():
116
  suggestion_1 = '''
117
  - Provides offers with many benefits if they subscribe for the long term
118
  - Offers annual DSL internet packages at affordable prices
 
119
  '''
120
 
121
  cluster_2 = '''
@@ -124,10 +130,14 @@ def run():
124
  - Moderate monthly charges
125
  '''
126
 
 
 
 
 
 
127
  suggestion_2 = '''
128
- Providing special packages with the following criteria:
129
- - High speed internet but lower bandwidth at a cheaper price than normal packages
130
- - Low speed internet but large bandwidth so the connection is much more stable at a cheaper price than normal packages
131
  '''
132
 
133
  if c0 != '':
@@ -138,7 +148,7 @@ def run():
138
  st.markdown('---')
139
 
140
  if c1 != '':
141
- st.write(f'##### Cluster 2 - Mixuage - {len(df_cluster_1)} customer ({((len(df_cluster_1)/churnCustomer)*100):.1f}%)')
142
  st.write(cluster_1)
143
  st.write('Suggestion for `', c1[0:-2], '` is')
144
  st.write(suggestion_1)
 
101
  - High monthly charges
102
  '''
103
 
104
+ # suggestion_0 = '''
105
+ # - Offers packages with additional speed for 3 months for those who have subscribed for more than 3 years
106
+ # - Open all TV channels during big holiday events such as Eid, Christmas and others
107
+ # - Provide special offers to increase internet speed to them
108
+ # '''
109
  suggestion_0 = '''
110
+ - Offers long term packages
111
+ - Give limited time offer
112
+ - Maintain good communication with this customer
113
  '''
114
 
115
  cluster_1 = '''
 
121
  suggestion_1 = '''
122
  - Provides offers with many benefits if they subscribe for the long term
123
  - Offers annual DSL internet packages at affordable prices
124
+ - New customer onboarding and orientation
125
  '''
126
 
127
  cluster_2 = '''
 
130
  - Moderate monthly charges
131
  '''
132
 
133
+ # suggestion_2 = '''
134
+ # Providing special packages with the following criteria:
135
+ # - High speed internet but lower bandwidth at a cheaper price than normal packages
136
+ # - Low speed internet but large bandwidth so the connection is much more stable at a cheaper price than normal packages
137
+ # '''
138
  suggestion_2 = '''
139
+ - Make an affordable internet package prices for this cluster
140
+ - Provides Variation in Payment Method
 
141
  '''
142
 
143
  if c0 != '':
 
148
  st.markdown('---')
149
 
150
  if c1 != '':
151
+ st.write(f'##### Cluster 2 - Mixage - {len(df_cluster_1)} customer ({((len(df_cluster_1)/churnCustomer)*100):.1f}%)')
152
  st.write(cluster_1)
153
  st.write('Suggestion for `', c1[0:-2], '` is')
154
  st.write(suggestion_1)