
How to run Streamlit in google colab
AS
Anthony SandeshStreamlit is a Python library for building web apps. Running apps locally depends on your system’s configuration and compatibility, which can sometimes be a hurdle.
Google Colab comes to the rescue here — you can use Colab without worrying about your local setup.
I’ve divided the Colab notebook into three cells, each handling a specific task:
1️⃣ First Cell
2️⃣ Second Cell
3️⃣ Third Cell
Runs streamlit run app.py in the background, storing output in a nohup.out file. & allows the process to run without blocking the notebook.
Connects to Ngrok on port 8501 to get a public URL for your app.
Note:
Run the cells in order.
Once you obtain the public URL, only modify and re-run Cell 2.
Do not re-run Cells 1 or 3 after you have the URL, as this may lead to errors.


