guide / README.md
Saravanakumar R
fix: add HF Spaces README frontmatter
a4dc1e4
|
Raw
History Blame Contribute Delete
1.43 kB
metadata
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)

huggingface-cli login
python scripts/upload_models_to_hub.py --repo-id <your-username>/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

git remote add hf https://huggingface.co/spaces/<your-username>/guide
git push hf main

4. Set the build argument

In the Space Settings β†’ Build, set:

HF_MODEL_REPO=<your-username>/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.