UWaterlooRFRChatBot / docs /06_deploying_updates.md
Anna Zhou
Add team handoff documentation
c8016f6
|
Raw History Blame Contribute Delete
2.37 kB

A newer version of the Streamlit SDK is available: 1.67.0

Upgrade

06 - Deploying Updates

This guide explains how to get local changes onto GitHub and Hugging Face.

Recommended Workflow

Use GitHub as the shared source of truth and Hugging Face as the live app host.

The usual flow is:

local computer -> GitHub -> Hugging Face

Before Deploying

Run:

git status
git diff --stat
python3 -m py_compile app/app.py

If you changed case-study data, also run:

python3 ingest/create_summary_chunks.py
python3 ingest/embed_and_index.py

If you changed the app, test locally:

streamlit run app/app.py

Commit the Right Files

For website text/code changes:

git add app/app.py
git commit -m "Update website"

For a new case study:

git add data/extracted/CS124.json
git add data/extracted/case_summaries.json
git add data/extracted/precomputed_embeddings.json
git add data/raw/CS124/case_meta.json
git add case_study_pipeline/drive_folders.json
git add ingest/source_link_overrides.json
git commit -m "Add CS124 case study"

Do not add raw PDFs unless the team explicitly decides to store PDFs in GitHub.

Push to GitHub

git push shared-github HEAD:main

If working on a branch:

git push origin your-branch-name

Then open a pull request into main.

Push to Hugging Face

Manual push:

git push uwrfr-chatbot HEAD:main

Check status:

hf spaces info UWRFR/UWaterlooRFRChatBot

The Hugging Face Space may take a minute to rebuild.

GitHub Action Deployment

The repo has a GitHub Action:

.github/workflows/deploy-hf-space.yml

It can upload the repo to a Hugging Face Space.

For it to work, GitHub needs:

Secret:

HF_TOKEN

Variable or workflow input:

HF_SPACE_ID

For this project, the target Space is:

UWRFR/UWaterlooRFRChatBot

Files Excluded from Hugging Face Upload

The deployment excludes files such as:

.git/
.github/
venv/
__pycache__/
data/raw/
*.pdf

That means raw source PDFs usually stay in Google Drive, while processed JSON and embeddings are deployed to the website.

After Deploying

Open:

https://uwrfr-uwaterloorfrchatbot.hf.space

Check:

  • The website loads.
  • The navigation works.
  • New case studies appear.
  • Source links appear.
  • A test question works.
  • Previous Responses still work.