Skip to content

A repository containing for a ML model for deployment onto StreamLit

License

Notifications You must be signed in to change notification settings

AI4ALL-Official/Iris_Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iris Deployment

Python Contributions welcome GitHub issues License

This application is designed to deploy a random forest algorithm to predict iris subtype based on user slider input using StreamLit.

Table of Contents

What is deployment?
Why is model deployment important?
Deployment Workflow
Quickstart
Building your own StreamLit Deployable Model

What is deployment?

Model deployment is how you can share your developed model with others. There are industrial solutions, environmental containers, and more localized solutions.

Why is model deployment important?

Model deployment is critical for collaborative development and testing. It is also important for distribution of a model to a broader audience.

Deployment Workflow

Types of Deployments

Below are different methods other than StreamLit to deploy ML models

Raw Files

Saving trained machine learning models as an H5, pkl, or sav file to be loaded into the environment by another user

Containerized Environment

Building a machine learning model and deploying the whole environment including the model itself as a Docker container.

Web Application Framework

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.

Hosting Services

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.

Building your own StreamLit Deployable 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.

  1. To start fork this repository into your own GitHub account.
  2. Sign up for an account on StreamLit
  3. Link StreamLit to your GitHub Account

  4. Build a new application by selecting "New App"

  5. Create a new application by selecting the proper repository from the dropdown:

  6. Make sure to change the Main File Path from "streamlit_app.py" to "app.py"

  7. You can choose a custom URL name for the application
  8. Wait for the application to build

To run this locally:

Unzip Iris Deployment and CD into Directory

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.

About

A repository containing for a ML model for deployment onto StreamLit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages