Here are the steps to incorporate ExplainerDashboard into a Streamlit application:
pip install explainerdashboard
pip install streamlit
import streamlit as st
from explainerdashboard import ClassifierExplainer, ExplainerDashboard
uploaded_file = st.file_uploader("Upload your input CSV file", type=["csv"])
if uploaded_file is not None:
df = pd.read_csv(uploaded_file)
from sklearn.linear_model import LogisticRegression
X = df.drop(columns=['target'])
y = df['target']
clf = LogisticRegression().fit(X, y)
explainer = ClassifierExplainer(clf, X, y)
db = ExplainerDashboard(explainer)
streamlit.components.v1.html()
function.dashboard_html = db.to_html()
st.components.v1.html(dashboard_html, height=800)
Now you should be able to incorporate ExplainerDashboard into your Streamlit application.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-06-29 11:00:00 +0000
Seen: 13 times
Last updated: Jan 18 '23
Is it possible to globally install System.Data.OleDb?
How to debug NextJS application in VSCode?
Why does the app shut down when switching to the Google Maps section in a Flutter application?
How can an application Manager be put in place to manage the system?
How can a Qt application detect a trigger triggered by a batch script?
How can I execute a React Native application on my Android device?
What conditions could cause Wildfly to automatically undeploy an EAR?
How can an application be run with parameters from the context menu?