Spaces:
Runtime error
Runtime error
nurindahpratiwi
commited on
Commit
·
14ef77d
1
Parent(s):
17f565c
update
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ from transformers import pipeline
|
|
11 |
import datetime
|
12 |
from huggingface_hub import hf_hub_download
|
13 |
|
14 |
-
REPO_ID = "
|
15 |
|
16 |
num_imputer = joblib.load(
|
17 |
hf_hub_download(repo_id=REPO_ID, filename="numerical_imputer.joblib")
|
@@ -53,25 +53,28 @@ st.subheader("Enter the details to predict sales")
|
|
53 |
input_data = {}
|
54 |
col1,col2 = st.columns(2)
|
55 |
with col1:
|
56 |
-
input_data[
|
57 |
-
input_data[
|
58 |
-
|
59 |
-
|
60 |
-
input_data[
|
61 |
-
input_data[
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
input_data['store_type'] = st.selectbox("store_type",['D', 'C', 'B', 'E', 'A'])
|
66 |
-
input_data['cluster'] = st.number_input("cluster",step=1)
|
67 |
|
68 |
with col2:
|
69 |
-
input_data[
|
70 |
-
input_data[
|
71 |
-
input_data[
|
72 |
-
input_data[
|
73 |
-
input_data[
|
74 |
-
input_data[
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
|
77 |
# Define CSS style for the download button
|
|
|
11 |
import datetime
|
12 |
from huggingface_hub import hf_hub_download
|
13 |
|
14 |
+
REPO_ID = "AlbieCofie/predict-customer-churn"
|
15 |
|
16 |
num_imputer = joblib.load(
|
17 |
hf_hub_download(repo_id=REPO_ID, filename="numerical_imputer.joblib")
|
|
|
53 |
input_data = {}
|
54 |
col1,col2 = st.columns(2)
|
55 |
with col1:
|
56 |
+
input_data["gender"] = st.radio('Select your gender', ('male', 'female'))
|
57 |
+
input_data["SeniorCitizen"] = st.radio("Are you a Seniorcitizen; No=0 and Yes=1", ('0', '1'))
|
58 |
+
input_data["Partner"] = st.radio('Do you have Partner', ('Yes', 'No'))
|
59 |
+
input_data["Dependents"] = st.selectbox('Do you have any Dependents?', ('No', 'Yes'))
|
60 |
+
input_data["tenure"] = st.number_input('Lenght of tenure (no. of months with Telco)', min_value=0, max_value=90, value=1, step=1)
|
61 |
+
input_data["PhoneService"] = st.radio('Do you have PhoneService? ', ('No', 'Yes'))
|
62 |
+
input_data["MultipleLines"] = st.radio('Do you have MultipleLines', ('No', 'Yes'))
|
63 |
+
input_data["InternetService"] = st.radio('Do you have InternetService', ('DSL', 'Fiber optic', 'No'))
|
64 |
+
input_data["OnlineSecurity"] = st.radio('Do you have OnlineSecurity?', ('No', 'Yes'))
|
|
|
|
|
65 |
|
66 |
with col2:
|
67 |
+
input_data["OnlineBackup"] = st.radio('Do you have OnlineBackup?', ('No', 'Yes'))
|
68 |
+
input_data["DeviceProtection"] = st.radio('Do you have DeviceProtection?', ('No', 'Yes'))
|
69 |
+
input_data["TechSupport"] = st.radio('Do you have TechSupport?', ('No', 'Yes'))
|
70 |
+
input_data["StreamingTV"] = st.radio('Do you have StreamingTV?', ('No', 'Yes'))
|
71 |
+
input_data["StreamingMovies"] = st.radio('Do you have StreamingMovies?', ('No', 'Yes'))
|
72 |
+
input_data["Contract"] = st.selectbox('which Contract do you use?', ('Month-to-month', 'One year', 'Two year'))
|
73 |
+
input_data["PaperlessBilling"] = st.radio('Do you prefer PaperlessBilling?', ('Yes', 'No'))
|
74 |
+
input_data["PaymentMethod"] = st.selectbox('Which PaymentMethod do you prefer?', ('Electronic check', 'Mailed check', 'Bank transfer (automatic)',
|
75 |
+
'Credit card (automatic)'))
|
76 |
+
input_data["MonthlyCharges"] = st.number_input("Enter monthly charges (the range should between 0-120)")
|
77 |
+
input_data["TotalCharges"] = st.number_input("Enter total charges (the range should between 0-10.000)")
|
78 |
|
79 |
|
80 |
# Define CSS style for the download button
|