My Brain CellsMy Brain Cells
HomeBlogAbout

© 2026 My Brain Cells

XGitHubLinkedIn
How to run Streamlit in google colab

How to run Streamlit in google colab

AS
Anthony Sandesh
Streamlit 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.

More posts

SGLang: The Engine That's Redefining High-Performance LLM Programming

SGLang: The Engine That's Redefining High-Performance LLM Programming

Deep Dive into NVIDIA TensorRT with PyTorch and ONNX

Deep Dive into NVIDIA TensorRT with PyTorch and ONNX

PyCaret Guide

PyCaret Guide

Web Scraping using Selenium guide

Newer

Web Scraping using Selenium guide

Personal Finance Analysis with Local LLMs

Older

Personal Finance Analysis with Local LLMs

On this page

  1. 1️⃣ First Cell
  2. 2️⃣ Second Cell
  3. 3️⃣ Third Cell