EmmanuelJoshua/Customer_Churn_Prediction
0
1import gradio as gr2import pandas as pd3import numpy as np4import tensorflow as tf5 6# Load model7model = tf.keras.models.load_model("churn_model.h5")8 9def predict_churn(*inputs):10 # Build DataFrame as in the previous example, or turn inputs into a numpy array if that's what your model needs11 input_df = ... # same as above12 proba = model.predict(input_df)[0][0]13 return "Churn" if proba > 0.5 else "Not Churn"14 15# (Rest of code as above)16 