This repository includes code and resources for:
-
Building a churn prediction model using machine learning techniques 🤖📊
-
Code for building and training the churn prediction model 📝🔬
-
Preprocessed dataset for model training and evaluation 📊🔢
-
Instructions for setting up the development environment and dependencies 🛠️📦
-
Deploying the model with Gradio for a user-friendly interface 🚀🌐
-
Allowing users to input customer data and receive churn predictions 📈💡
Code | Name | Published Article | Deployed App |
---|---|---|---|
LP4 | Churn Prediction with Gradio | Churn Prediction article | Churn Preiction App |
-
Machine learning techniques for model development 🧠💻
-
Gradio for creating the web interface 🌐🖥️
For manual installation, you need to have Python 3
on your system. Then you can clone this repo and be at the repo's root https://github.com/aliduabubakari/churn-prediction-with-gradio.git
to follow the steps as outlined below;
To run the evaluation locally, follow these steps:
-
Create a Python virtual environment to isolate the project's required libraries and avoid conflicts. Execute the following command in your terminal:
python -m venv venv
-
Activate the Python virtual environment to use the isolated Python kernel and libraries. Run the appropriate command based on your operating system:
- For Windows:
venv\Scripts\activate
- For Linux and MacOS:
source venv/bin/activate
-
Upgrade Pip, the package manager, to ensure you have the latest version. Use the following command:
python -m pip install --upgrade pip
-
Install the required libraries listed in the
requirements.txt
file. Run the command:python -m pip install -r requirements.txt
Note: If you encounter any issues on MacOS, please make sure Xcode is installed.
By following these steps, you will set up the necessary environment and install all the required packages to run the evaluation on your local machine.
To run the demo app (being at the repository root), use the following command:
python churnProject3.py
The Gradio app will start running and provide you with a local server address (e.g., http://127.0.0.1:7860/). Open your web browser and enter this address to access the app.
Interact with the Gradio app in your web browser and test the churn prediction functionality.
Alternatively, you can visit: click here ⬇️
By clicking on the image, you will be redirected to the Churn Prediction App.
Choose the gender of the customer. Indicate whether the customer is a senior citizen (0 for NO, 1 for YES). Select whether the customer has a partner.
Specify if the customer has any dependents.
Enter the length of the tenure in months.
Select the availability of phone service, multiple lines, internet service, online security, and online backup.
Specify if the customer has the following; Deviceprotection, Techsupport, StreamingTV and streamingMovies.
-
Choose if the customer prefers paperless billing.
-
Select the payment method.
-
Enter the monthly charges and total charges.
-
Submit all the entered values.
-
Click on the "Predict" button to obtain the prediction.
- View the prediction result based on the input values.
By following these steps, you can input the necessary information and get the churn prediction for the customer. The app provides an intuitive and user-friendly interface for easy execution and interpretation of the prediction.
Feel free to explore and make predictions with the app! 🎉🔍
-
Accurate churn prediction to identify customers at risk of leaving 🎯🔍
-
User-friendly interface for easy input and prediction retrieval 🌐💡
-
Potential for data-driven decision-making and customer retention strategies 💼📉
The churn prediction model and deployment with Gradio offer a powerful solution for predicting customer churn and improving customer retention efforts. By leveraging machine learning techniques and a user-friendly interface, businesses can make data-driven decisions to identify at-risk customers and implement effective retention strategies. Explore the repository and start building your own churn prediction application! 🚀💪
Alidu Abubakari
Data Analyst
Azubi Africa