LLMs-from-scratch icon indicating copy to clipboard operation
LLMs-from-scratch copied to clipboard

[Chapter 06] Add “Deploy on Streamlit Community Cloud” section

Open vaifai opened this issue 7 months ago • 2 comments

Proposal

I’d like to add a new section at the end of Chapter 06, “Deploy on Streamlit Community Cloud,” which walks readers through:

  1. Uploading their trained model to Hugging Face Model Hub
  2. Creating a minimal Streamlit app that loads the model from Hugging Face
  3. Deploying the app on Streamlit Community Cloud
  4. Tips on sharing the public URL as a portfolio/demo

Motivation

  • Many learners finish training and evaluation but don’t know how to turn models into live demos.
  • Streamlit Community Cloud offers free hosting and a simple workflow.
  • This addition will help users showcase their models in portfolios and accelerate learning by seeing models in action.

Proposed changes

  • Add a new subsection under ch06_deploying_models.md (or equivalent)
  • Include code snippets for:
    • Authenticating to Hugging Face
    • Pushing a model with huggingface_hub
    • Building a basic streamlit_app.py
    • Deploying via Streamlit’s GitHub integration
  • Screenshots of the Hugging Face and Streamlit UI (optional)

Additional context

I can draft a full markdown write-up and example repo if the idea is approved. Let me know if there are any preferences on formatting or placement!

For instance, Here is my streamlit app after reading through the chapters in the book : Spam Detector Streamlit App

vaifai avatar May 08 '25 12:05 vaifai

Hi @rasbt , Thank you for writing such an excellent guide—I’ve learned so much about LLMs from your book. I had an idea to add a “Deploy on Streamlit Community Cloud” section to Chapter 06 so beginners can easily showcase their models, and I’d be honored to contribute a draft if you think it would be useful. Please let me know your thoughts!

vaifai avatar May 08 '25 12:05 vaifai

Hi @vaifai ,

Thank you for bringing up this exciting idea of adding a new section for deploying a Streamlit app on the cloud!👍🏻 Unfortunately, @rasbt is currently recovering from an injury, he will respond to your proposal as soon as he's feeling better.🙂

d-kleine avatar May 17 '25 20:05 d-kleine

Hi there and sorry for the very late follow-up. Thanks for generously offering to contribute this tutorial, but I would say it's a bit out of scope for now. If you have a tutorial you'd like to share, please feel free to post it in the Show & Tell section: https://github.com/rasbt/LLMs-from-scratch/discussions/categories/show-and-tell I'd also be happy to check it out and recommend it to others.

rasbt avatar Nov 02 '25 15:11 rasbt