Views
No views yet
Exited: 0 = stay, 1 = churn).pages/01_Bank_Churn_Prediction.py)artifacts/model.h5 (Keras model)artifacts/scaler.pkl (StandardScaler)artifacts/label_encoder_gender.pkl (LabelEncoder for Gender)artifacts/onehot_encoder_geo.pkl (OneHotEncoder for Geography)artifacts/schema.json (feature order + mappings)Churn_Modelling.csv (dataset copy used in training)artifacts/schema.json):
CreditScore, Gender, Age, Tenure, Balance, NumOfProducts, HasCrCard, IsActiveMember, EstimatedSalary, Geography_France, Geography_Germany, Geography_SpainGender: label-encoded (Female: 0, Male: 1)Geography: one-hot encoded into the 3 geography columnsStandardScaler (from scaler.pkl)[0, 1].schema.json stores a default decision threshold of 0.5.
(The Streamlit demo app uses 0.35 by default to be more sensitive to churn.)1import tensorflow as tf, pickle, json
2from huggingface_hub import hf_hub_download
3
4REPO_ID = "ash001/bank-churn-ann"
5
6model = tf.keras.models.load_model(hf_hub_download(REPO_ID, "artifacts/model.h5"), compile=False)
7scaler = pickle.load(open(hf_hub_download(REPO_ID, "artifacts/scaler.pkl"), "rb"))
8le_gender = pickle.load(open(hf_hub_download(REPO_ID, "artifacts/label_encoder_gender.pkl"), "rb"))
9ohe_geo = pickle.load(open(hf_hub_download(REPO_ID, "artifacts/onehot_encoder_geo.pkl"), "rb"))
10schema = json.load(open(hf_hub_download(REPO_ID, "artifacts/schema.json"), "r"))pages/01_Bank_Churn_Prediction.py..pkl artifacts—only unpickle files you trust.