Introduction to Streamlit

Streamlit is an open-source Python library that enables us to easily build a web application.

It’s ideal for data scientists that may want to do this without the complexity of a framework like Django or Flask or without the need to know front-end development.

We use just a few lines of code to make these web applications.

The Streamlit logo

This ease of use means that data scientists can focus more on developing models that can be easily deployed rather than struggling to deploy the models. They also don’t need to rely on external teams to help them deploy these models.

Hello world!

Install Streamlit

To install Streamlit, we run the pip install streamlit command in a terminal window.

Run Streamlit

Once it’s installed, we run the streamlit hello command.

This opens a browser window that launches a demo application.

We click the “Click to launch app!” button below to launch the Streamlit application in a browser.

Please login to launch live app!

Explore the Streamlit demo

We can choose a demo from the browser window’s left panel and see what it does.

There are four different applications we can interact with to get a feel for what Streamlit has to offer.

These demos showcase several features that we’ll learn to build in future lessons. In the next lesson, we learn to display various kinds of information with Streamlit.