fadyabila commited on
Commit
10e9376
1 Parent(s): d66653a

final submission

Browse files
Files changed (2) hide show
  1. eda.py +1 -1
  2. prediction.py +3 -3
eda.py CHANGED
@@ -68,7 +68,7 @@ def run():
68
  # Magic Syntax
69
  st.write(
70
  ' On this page, the author will do a simple exploration.'
71
- ' The dataset used is the Churn Custimer dataset.'
72
  ' This dataset comes from Github Project Hacktiv8.')
73
 
74
  # Show DataFrame
 
68
  # Magic Syntax
69
  st.write(
70
  ' On this page, the author will do a simple exploration.'
71
+ ' The dataset used is the Churn Customer dataset.'
72
  ' This dataset comes from Github Project Hacktiv8.')
73
 
74
  # Show DataFrame
prediction.py CHANGED
@@ -13,7 +13,7 @@ model_ann = load_model('customer_churn.h5')
13
 
14
  def run():
15
  with st.form(key='Churn_Customer_Prediction'):
16
- churn_risk_score = st.selectbox('Churn Risk', (0, 1), index=1)
17
  age = st.number_input('Age', min_value=23, max_value=65, value=23)
18
  gender = st.selectbox('Gender', ('Male', 'Female'), index=1)
19
  days_since_last_login = st.number_input('Last Login', min_value=0, max_value=26, value=0)
@@ -50,6 +50,7 @@ def run():
50
  submitted = st.form_submit_button('Predict')
51
 
52
  data_inf = {
 
53
  'age': age,
54
  'gender': gender,
55
  'region_category': region_category,
@@ -69,8 +70,7 @@ def run():
69
  'offer_application_preference': offer_application_preference,
70
  'past_complaint': past_complaint,
71
  'complaint_status': complaint_status,
72
- 'feedback': feedback,
73
- 'churn_risk_score': churn_risk_score
74
  }
75
 
76
  data_inf = pd.DataFrame([data_inf])
 
13
 
14
  def run():
15
  with st.form(key='Churn_Customer_Prediction'):
16
+ user_id = st.text_input('User_ID', value='')
17
  age = st.number_input('Age', min_value=23, max_value=65, value=23)
18
  gender = st.selectbox('Gender', ('Male', 'Female'), index=1)
19
  days_since_last_login = st.number_input('Last Login', min_value=0, max_value=26, value=0)
 
50
  submitted = st.form_submit_button('Predict')
51
 
52
  data_inf = {
53
+ 'user_id': user_id,
54
  'age': age,
55
  'gender': gender,
56
  'region_category': region_category,
 
70
  'offer_application_preference': offer_application_preference,
71
  'past_complaint': past_complaint,
72
  'complaint_status': complaint_status,
73
+ 'feedback': feedback
 
74
  }
75
 
76
  data_inf = pd.DataFrame([data_inf])