--- title: G.U.I.D.E. emoji: 📋 colorFrom: blue colorTo: indigo sdk: docker pinned: false --- # G.U.I.D.E. G.U.I.D.E. - Grievance Utility for Information extraction, Drafting and Enrichment ## Deploying to Hugging Face Spaces ### 1. Upload model weights to HF Model Hub (one-time) ```bash huggingface-cli login python scripts/upload_models_to_hub.py --repo-id /guide-models ``` This uploads only inference-needed files (`config.json`, `model.safetensors`, `tokenizer*.json`, `model.pt`). Training checkpoints are excluded automatically. ### 2. Create a Dockerfile Space on HF Create a new Space at huggingface.co/spaces with **Dockerfile** as the Space SDK. ### 3. Push the code ```bash git remote add hf https://huggingface.co/spaces//guide git push hf main ``` ### 4. Set the build argument In the Space **Settings → Build**, set: ``` HF_MODEL_REPO=/guide-models ``` ### 5. Set the API key secret In the Space **Settings → Secrets**, add: ``` ANTHROPIC_API_KEY=sk-ant-... ``` The key is injected at runtime — it is never baked into the Docker image. ### Architecture note The Space runs two processes inside one container: - **FastAPI** on `:8000` — internal only, not publicly exposed - **Gradio** on `:7860` — the public-facing UI served by HF Spaces The Gradio frontend calls `http://localhost:8000` internally; no ports other than 7860 need to be open.