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 6 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