Spaces:
Runtime error
Runtime error
final submission
Browse files- eda.py +1 -1
- 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
|
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 |
-
|
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])
|