More Deep Learning Articles…

Streamlit: Turning Machine Learning Models into Interactive Web Apps

This tutorial shows how to build an attractive, interactive machine learning web app with Streamlit, an open-source Python library, without any web development experience. Streamlit apps are pure Python scripts with no HTML or CSS, offer data caching, are quick to build and deploy, support many data science frameworks, and treat widgets as variables.

The project builds a dashboard for binary classification of the UCI mushroom dataset (edible or poisonous). It covers installing and importing the libraries; creating the page with st.title, headers, Markdown and a sidebar; running the app locally on port 8501 with live reload; loading and label-encoding the data inside a cached function (@st.cache) and optionally showing the raw data; splitting it into training and test sets; and plotting evaluation metrics chosen by the user (confusion matrix, ROC curve, precision-recall curve). Users can then pick a classifier from a drop-down menu and tune its hyperparameters with sidebar widgets: a support vector machine (regularisation parameter, RBF or linear kernel, gamma), logistic regression (regularisation and maximum iterations) and a random forest (number of trees, maximum depth, bootstrap samples), with accuracy, precision and recall shown on the main page.

The Arabic article is a translation of an English article. Read the original: A brief introduction to building interactive ML WebApps With Streamlit (Analytics Vidhya).

Post links

Leave a comment

Your email address will not be published. Required fields are marked *