This application is designed to deploy a random forest algorithm to predict iris subtype based on user slider input using StreamLit.
What is deployment?
Why is model deployment important?
Deployment Workflow
Quickstart
Building your own StreamLit Deployable Model
Model deployment is how you can share your developed model with others. There are industrial solutions, environmental containers, and more localized solutions.
Model deployment is critical for collaborative development and testing. It is also important for distribution of a model to a broader audience.
Below are different methods other than StreamLit to deploy ML models
Saving trained machine learning models as an H5, pkl, or sav file to be loaded into the environment by another user
Building a machine learning model and deploying the whole environment including the model itself as a Docker container.
Building the model into a web application is a common method for deploying a model and is essentially what is happening in this StreamLit pipeline. Other python methods to build applications include Django and Flask.
Once a model is saved or built into a web application framework, cloud-based methods like Heroku, AWS Sagemaker, or StreamLit are needed to host the application and allow external users the ability to interact with the model.
For this assignment, you will be forking this repository into your GitHub and connecting it with StreamLit to deploy the model on your own account.
- To start fork this repository into your own GitHub account.
- Sign up for an account on StreamLit
- Link StreamLit to your GitHub Account
- Build a new application by selecting "New App"
- Create a new application by selecting the proper repository from the dropdown:
- Make sure to change the Main File Path from "streamlit_app.py" to "app.py"
- You can choose a custom URL name for the application
- Wait for the application to build
To run this locally:
unzip Iris_Deployment-main.zip
cd Iris_Deployment-main
Install StreamLit Locally (assuming you have python and pip)
pip install streamlit
Run the application by running the app.py file
streamlit run app.py
You may need to copy and past http://localhost:8501
into a browser if it does not automatically open up a tab.