Streamlit¶
Streamlit is an open-source Python library that makes it easy to create and share beautiful, custom web apps for machine learning and data science. In this section, we will learn how to use Streamlit to create a simple web app that displays a list of movies and their ratings.
Prerequisites¶
- Python 3.6 or later
- Streamlit library
Step 1: Install Streamlit¶
To install Streamlit, run the following command in your terminal:
pip install streamlit
Step 2: Create a new Streamlit app¶
To create a new Streamlit app, run the following command in your terminal:
streamlit hello
This will create a new directory called my_first_app
with a sample app. Open the app.py
file in your text editor to see the code.
Step 3: Add a list of movies and their ratings¶
To add a list of movies and their ratings, replace the code in app.py
with the following:
import streamlit as st
# Create a list of movies and their ratings
Pydeck¶
Pydeck is a Python library for creating data visualizations using deck.gl, an open-source WebGL-based visualization framework. We can use it to create a map of the movies and their ratings.