What is streamlit How to install streamlit

In this recipe, we will learn what is Streamlit and how can we install it on our systems.

Recipe Objective: What is streamlit and how to set it up?

What is Streamlit?

Streamlit is an open-source library that enables us to develop a frontend for our machine learning and data science apps using Python. You write an app in Streamlit the same way you write a python code. It makes creating custom web apps for machine learning and data science a cakewalk. You can create and deploy complex data apps in minutes.

Setting up Streamlit

There are a few prerequisites before you install streamlit. You will need the following things up and running in your system first-
1) Your favorite IDE or text editor
2) Python 3.7 - Python 3.9
3) PIP

Next, streamlit recommends usingn a virtual environment. This ensures that the dependencies pulled in for Streamlit don't impact any other Python projects that you are working on. You can use pipenv, poetry, venv, virtualenv or conda for environment management.

Explore the Real-World Applications of Recommender Systems 

Finally, you can easily install the streamlit library using the "pip" command either in the terminal or directly in the notebook as follows -

#installing streamlit
!pip install streamlit

Once you have streamlit installed use the following command to check if the installation worked. Streamlit's Hello app should appear in a new tab in your default web browser.

#testing installation
!streamlit hello

To view streamlit documentation you can run "streamlit docs" in the terminal or in your .ipynb notebook as follows-

#viewing documentation
!streamlit docs

To check the current version of streamlit you use the following command-

#checking version
!streamlit --version

To upgrade to the latest version of Streamlit you can either run "pip install --upgrade streamlit" in the terminal or run-

#upgrading streamlit
!pip install --upgrade streamlit

The latest version of Streamlit is compatible with the two most recent versions of Google Chrome, Firefox, Microsoft Edge, and Safari.

What Users are saying..

profile image

Ameeruddin Mohammed

ETL (Abintio) developer at IBM
linkedin profile url

I come from a background in Marketing and Analytics and when I developed an interest in Machine Learning algorithms, I did multiple in-class courses from reputed institutions though I got good... Read More

Relevant Projects

Build a Music Recommendation Algorithm using KKBox's Dataset
Music Recommendation Project using Machine Learning - Use the KKBox dataset to predict the chances of a user listening to a song again after their very first noticeable listening event.

Build CNN Image Classification Models for Real Time Prediction
Image Classification Project to build a CNN model in Python that can classify images into social security cards, driving licenses, and other key identity information.

MLOps Project for a Mask R-CNN on GCP using uWSGI Flask
MLOps on GCP - Solved end-to-end MLOps Project to deploy a Mask RCNN Model for Image Segmentation as a Web Application using uWSGI Flask, Docker, and TensorFlow.

Credit Card Fraud Detection as a Classification Problem
In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.

Build a Churn Prediction Model using Ensemble Learning
Learn how to build ensemble machine learning models like Random Forest, Adaboost, and Gradient Boosting for Customer Churn Prediction using Python

Build CNN for Image Colorization using Deep Transfer Learning
Image Processing Project -Train a model for colorization to make grayscale images colorful using convolutional autoencoders.

Create Your First Chatbot with RASA NLU Model and Python
Learn the basic aspects of chatbot development and open source conversational AI RASA to create a simple AI powered chatbot on your own.

Azure Text Analytics for Medical Search Engine Deployment
Microsoft Azure Project - Use Azure text analytics cognitive service to deploy a machine learning model into Azure Databricks

Build a Speech-Text Transcriptor with Nvidia Quartznet Model
In this Deep Learning Project, you will leverage transfer learning from Nvidia QuartzNet pre-trained models to develop a speech-to-text transcriptor.

Deep Learning Project for Beginners with Source Code Part 1
Learn to implement deep neural networks in Python .