# Deploying Thousand Token Wood (Lester's steps) The repo is deploy-ready. These steps need your Hugging Face + Modal accounts, so they're yours to run. Claude can help debug build logs after. ## 0. Make sure the model endpoint is live ```bash python -m modal deploy serve.py # deploys the ttw-serve app (Qwen2.5-3B on vLLM) ``` Confirm it shows in https://modal.com/apps (app name `ttw-serve`). ## 1. Create the Space Create a **Gradio** Space under the hackathon org: `https://huggingface.co/new-space` -> Owner = **build-small-hackathon**, SDK = Gradio. (Name it e.g. `thousand-token-wood`.) ## 2. Give the Space Modal credentials (so the app can reach the endpoint) The Gradio app calls the Modal endpoint via the Modal client, which authenticates from env vars. In the Space: **Settings -> Variables and secrets -> New secret**, add: - `MODAL_TOKEN_ID` = your Modal token id (from `~/.modal.toml`, or modal.com Settings -> API Tokens) - `MODAL_TOKEN_SECRET` = your Modal token secret (Do NOT set `TTW_DUMMY`; leaving it unset runs the real model.) ## 3. Push the code to the Space ```bash git init git remote add space https://huggingface.co/spaces/build-small-hackathon/thousand-token-wood git add app.py serve.py requirements.txt README.md ttw/ tests/ DEPLOY.md tasks/ git commit -m "Thousand Token Wood: emergent small-model economy" git push space main ``` (Use an HF write token if prompted for a password.) ## 4. Verify - The Space builds (watch the log), then loads. - Press **Step** a few times: trades appear, prices move, creatures' thoughts show. - If the page fails to load, the usual cause is missing/incorrect Modal secrets (the app builds the Modal handle on load) -- recheck step 2. ## 5. Submit (by June 15) - Record the demo video (suggested arc: Step to a calm market, then **Tempt Fate** into "The Run on Oona's Hoard" and watch honey crash as the owl liquidates). - Write the Field Notes blog post (bonus badge). - Social post with the Space link. - Submit Space link + video + post on the hackathon page. ## Bonus badges this already targets - 📡 Sharing is Caring: the reasoning traces are shown and shareable. - 📓 Field Notes: write-up. - 🐜 Tiny Titan: 3B model (≤4B). - 🤖 Best Agent: multi-agent economy. - 🟢 Modal Awards: served on Modal.