Build the DataFrame and Model Performance UI with Streamlit
Explore how to build an interactive Streamlit UI that displays a DataFrame and visualizes logistic regression model performance. Learn to show titles, tables, model scores, and confusion matrix results using Streamlit components and matplotlib charts.
We'll cover the following...
Streamlit apps
To run a Streamlit app, type the following command: streamlit run app.py.
Since we don’t have any components yet, we should see a blank screen… At the top right corner in the interface of the output, the “Rerun” button in the drop-down menu tells Streamlit to reload each time we change our code.
import streamlit
Title and input DataFrame
We’ll use the following functions for this part of our web app:
-
title(str): This method is like a<h1>tag. It takes a string as a parameter and displays the text as a title. -
subheader(str): It’s like the ...