Deployment using Streamlit Sharing
Learn how to use Streamlit sharing to deploy your Streamlit apps.
In previous chapters, we built a GitHub web scraper and a KNN classification model from scratch and used Streamlit for UI.
However, if we can’t show our web apps in a visually impressive way, then what would be the point?
In this chapter, we’ll learn how to deploy our machine learning web app using Streamlit Sharing.
Streamlit sharing
Streamlit Sharing is a service provided by Streamlit to easily deploy our application. Below, we will walk over the steps in the deployment process in the “Build a Classification Web App using Streamlit and Sklearn” chapter.
Create a text file with the necessary libraries
Create a requirements.txt
file with the dependencies. Use the following command to create the file:
pip freeze > requirements.txt
Note: Make sure your virtual environment is activated before you type the above command.
Upload the files to GitHub
Create a public repository on GitHub and upload the .py
files and the requirements.txt
file.
Get hands-on with 1400+ tech skills courses.