Spaces:
Runtime error
Runtime error
push 3
Browse files
app.py
CHANGED
@@ -17,31 +17,47 @@ model = load_model('best_model.h5')
|
|
17 |
st.subheader('Customer Churn Prediction')
|
18 |
st.write('Please Fill The Information Below')
|
19 |
|
|
|
|
|
|
|
|
|
20 |
# Variabel for input data
|
21 |
membership = ['Premium Membership', 'Platinum Membership', 'Gold Membership','Silver Membership', 'Basic Membership', 'No Membership']
|
22 |
-
|
|
|
23 |
|
24 |
feedback_cat = ['Products always in Stock','Reasonable Price','User Friendly Website', 'Quality Customer Care',
|
25 |
'Poor Product Quality', 'Poor Website', 'Poor Customer Service', 'Too many ads', 'No reason specified']
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
|
|
29 |
|
30 |
-
|
|
|
31 |
|
32 |
-
joined_through_referral = st.radio('Using Refferall',('Yes', 'No'))
|
33 |
|
34 |
-
|
|
|
35 |
|
36 |
-
|
|
|
37 |
|
38 |
-
|
|
|
39 |
|
40 |
-
|
|
|
41 |
|
42 |
-
|
|
|
43 |
|
44 |
-
|
|
|
45 |
|
46 |
# make buttom for prediction
|
47 |
|
|
|
17 |
st.subheader('Customer Churn Prediction')
|
18 |
st.write('Please Fill The Information Below')
|
19 |
|
20 |
+
# make 2 columns
|
21 |
+
col1, col2 = st.columns(2)
|
22 |
+
col11, col22, col33 = st.columns(3)
|
23 |
+
|
24 |
# Variabel for input data
|
25 |
membership = ['Premium Membership', 'Platinum Membership', 'Gold Membership','Silver Membership', 'Basic Membership', 'No Membership']
|
26 |
+
with col1:
|
27 |
+
membership_category = st.radio('Membership',(membership))
|
28 |
|
29 |
feedback_cat = ['Products always in Stock','Reasonable Price','User Friendly Website', 'Quality Customer Care',
|
30 |
'Poor Product Quality', 'Poor Website', 'Poor Customer Service', 'Too many ads', 'No reason specified']
|
31 |
+
with col2:
|
32 |
+
feedback = st.radio('Feedback',(feedback_cat))
|
33 |
+
|
34 |
+
with col1:
|
35 |
+
offer_application_preference = st.radio('Prefer Offer',('Yes', 'No'))
|
36 |
|
37 |
+
with col2:
|
38 |
+
preferred_offer_types = st.radio('Offer Type',('Gift Vouchers/Coupons', 'Credit/Debit Card Offers','Without Offers'))
|
39 |
|
40 |
+
with col1:
|
41 |
+
joined_through_referral = st.radio('Using Refferall',('Yes', 'No'))
|
42 |
|
|
|
43 |
|
44 |
+
with col11:
|
45 |
+
points_in_wallet = st.number_input('Points In Wallet',0.00, 1500.00)
|
46 |
|
47 |
+
with col22:
|
48 |
+
avg_time_spent = st.number_input('Time Spent On Website (Hours)',0.00, 3050.00)
|
49 |
|
50 |
+
with col33:
|
51 |
+
avg_transaction_value = st.number_input('Total Transcation Amount (USD)',0.00, 99900.00)
|
52 |
|
53 |
+
with col11:
|
54 |
+
avg_frequency_login_days = st.slider('Login Website In A Day',0, 70)
|
55 |
|
56 |
+
with col22:
|
57 |
+
days_since_last_login = st.slider('Days Since Last Login',0, 30)
|
58 |
|
59 |
+
with col33:
|
60 |
+
days_since_join = st.slider('Days Since Join',0, 30)
|
61 |
|
62 |
# make buttom for prediction
|
63 |
|