---
title: Gather churn prediction insights with the Streamlit app
description: Use the Streamlit churn predictor app to present the drivers and predictions of your DataRobot model.

---

# Gather churn prediction insights with the Streamlit app {: #gather-churn-prediction-insights-with-the-streamlit-app }

[Access this AI accelerator on GitHub <span style="vertical-align: sub">:material-arrow-right-circle:{.lg }</span>](https://github.com/datarobot-community/ai-accelerators/tree/main/advanced_ml_and_api_approaches/Streamlit_template_datarobot_insights/README.md){ .md-button }

This app serves as an example of how to present the drivers and predictions of your Datarobot model using a Churn prediction use case. Building a churn predictor app using Streamlit and DataRobot is a great way to leverage the power of machine learning to improve customer retention.

The first step in building a churn prediction model is to collect and prepare your data. This typically involves gathering data on your customers' behavior, demographics, and usage patterns. Once you have your data, you can upload it to DataRobot and let the platform do the rest. After training, DataRobot provides detailed insights into the model's performance, including feature importance, model validation, and accuracy metrics.

Once you have a model that you're satisfied with, you can generate predictions on new data using DataRobot's prediction API. This workflow assumes that you have already generated these predictions and saved them as a CSV file.

To create a Streamlit app for churn prediction, you will need to import the necessary libraries, including Pandas, NumPy, Streamlit, Plotly, and PIL. You can then read in your prediction data and set up your Streamlit app's page configuration.

The app itself should allow users to specify criteria for viewing churn scores and top churn reasons. You can accomplish this using sliders and other interactive elements.

A workflow of this process for building a Streamlit app using DataRobot predictions can be found in the churn Streamlit app GitHub repository. This workflow can be adapted to present insights from other classification or regression models built in DataRobot.
