Spaces:
Sleeping
Sleeping
File size: 1,931 Bytes
dda66ad 7056be6 dda66ad 7056be6 dda66ad 7056be6 bc7d77f 7056be6 bc7d77f 7056be6 bc7d77f 7056be6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ---
title: Northwestern CS Kiosk
emoji: 🎓
colorFrom: purple
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---
# Northwestern CS Kiosk (Vanilla LM)
Chat kiosk for Northwestern CS department questions, powered by a **local decoder-only tool-calling LM** (no cloud APIs).
- **Planner:** local LM picks a tool + JSON arguments
- **Executor:** CSV archive lookups (faculty, office hours, locations, etc.)
- **Responder:** local LM writes a short answer; rule-based template fallback when LM prose is degraded
## What's bundled
| Path | Purpose |
|------|---------|
| `models/best.pt` | Trained checkpoint (~158 MB, Git LFS) |
| `models/tokenizer/` | Tokenizer from the same training run |
| `MSAI_Text_Generation/src/` | Minimal inference runtime only (16 files — not full training repo) |
| `Archive/` | Department CSV data |
| `backend/` + `frontend/` | FastAPI API + React UI |
## Local Docker test
```bash
docker build -t kiosk-vanilla .
docker run --rm -p 7860:7860 kiosk-vanilla
```
Open http://localhost:7860
## Hugging Face Space
This repo is the Docker Space at [monish563/kiosk_vanilla](https://huggingface.co/spaces/monish563/kiosk_vanilla).
After pushing, HF builds the image and serves on port **7860**. First query loads the model (may take ~30s).
### Push updates
Develop in this repo (`kiosk_vanilla/`). After retraining or code changes:
```bash
cd kiosk_vanilla
./scripts/prepare_hf_deploy.sh # refresh best.pt + tokenizer + MSAI runtime
git add -A
git commit -m "Update kiosk"
git push "https://monish563:$(hf auth token)@huggingface.co/spaces/monish563/kiosk_vanilla" main
```
## Environment (set in Dockerfile)
| Variable | Value in container |
|----------|-------------------|
| `MSAI_ROOT` | `/app/MSAI_Text_Generation` |
| `VANILLA_CHECKPOINT` | `/app/models/best.pt` |
| `VANILLA_TOKENIZER` | `/app/models/tokenizer` |
| `VANILLA_DEVICE` | `auto` (CUDA on GPU Spaces, else CPU) |
|