In this article, we’ll explain how to install Streamlit on Ubuntu 20.04.
Streamlit is the fastest way to build and share data apps. Streamlit turns data scripts into shareable web apps in minutes. All in Python. All for free. No front‑end experience required. It is an open-source app framework for Machine Learning and Data Science teams. Create beautiful data apps in hours, not weeks.
Update the server using following command:
# apt update -y && apt upgrade -y
Install python pip package manager using following command:
# apt install python3-pip -y
Install Streamlit using python pip package manager.
# pip install streamlit
To deploy Streamlit app, first we need to create one python file using following command:
# vim app.py
Add following content in the app.py file:
import streamlit as st
st.text_input("Your name", key="name")
# You can access the value at any point with:
st.session_state.name
Save and exit.
Now, deploy the app on :80 port using following command:
# streamlit run main.py –server.port 80
Navigate to your browser and access Streamlit app using your server IP.
Streamlit will close the session as soon as you exit SSH session. To make it persistence, we need to use screen tool. Once you create session in screen, you can close the terminal and connect the server using new terminal. It will create persistence session.
# screen -S streamlit
Deploy Streamlit app:
# streamlit run main.py –server.port 80
Now close the terminal and connect with server in new terminal and run following command list the screen session.
# screen -list
We have successfully completed with the installation process and also we have deployed our first app.
In this article, we have seen how to install Streamlit on Ubuntu 20.04.
In this article, we will see how to install and use zig programming language on…
This article was adapted from its original version on NixCraft. Sed is an acronym for…
You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…
Have you ever found yourself staring at a terminal full of 404 errors while trying…
One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 …
In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…