Machine Learning Web-App with Python & S ...

Machine Learning Web-App with Python & Streamlit

Mar 09, 2021

I have recently started exploring on building web-apps using Streamlit and found it pretty easy. They have a great and easy to follow documentation. It s

My main focus was to incorporate the user's interaction into the machine learning model. In this regard, I have used a public data to predict the risk of diabetes in people.

The project/source codes can be found at my GitHub.

Couple notes about the data and the project:

  • The training dataset is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. The objective of the dataset is to diagnostically predict whether or not a patient has diabetes, based on certain diagnostic measurements included in the dataset. Several constraints were placed on the selection of these instances from a larger database. In particular, all patients here are females at least 21 years old of Pima Indian heritage. More details are available in Kaggle website.

  • For the sake of training, XGBoost combined with Bayesian Optimization is used. The complete implementations of the used model/optimizer are available in SlickML library.

  • The model will be trained (based on the test size) using learning API of XGBoostCV on number of cross-validation folds, validated on the test set, and predicts the user's input. As seen, the test size, the number of folds for cross validation, evaluation metric, and user's input values can be passed dynamically.

  •  The presented app is only an examples of how to put together an end-to-end web-app using machine learning, python, and streamlit. You can always add your ideas to improve the current app.

  •  Pull requests and new collaboration ideas are welcome.

  • You can launch the apps as well: Diabetes Risk Predictor

Comments are always welcome!

Enjoy this post?

Buy Amirhessam Tahmassebi a coffee