Spaces:
Sleeping
Sleeping
File size: 1,726 Bytes
3de8fcc 1a13c0d 162e051 3de8fcc 162e051 3de8fcc 162e051 3de8fcc 162e051 178ff41 162e051 | 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 | ---
title: CoderInstruc
emoji: 🌵
colorFrom: green
colorTo: indigo
sdk: gradio
sdk_version: 6.20.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: CoderInstruc coding assistant (Qwen3-Coder + post-train)
---
# CoderInstruc
Chat Gradio + API para agents. Inferência remota via Hugging Face Inference Router
(não baixa o modelo 30B neste Space).
## Agents
```bash
curl https://huggingface.co/spaces/amarorn/CoderInstruc/agents.md
```
O `agents.md` é **gerado automaticamente** pela HF para todo Gradio Space. Agents (Claude Code, Codex, etc.) leem esse arquivo e chamam a API Gradio.
Endpoint útil neste app: **`ask`** (`prompt` → `answer`).
## Hardware
Este Space **não carrega o modelo 30B**. Só faz HTTP para a Inference API.
- Preferido: **CPU Basic**
- Se estiver em **ZeroGPU**, o `app.py` inclui `@spaces.GPU` para o runtime não falhar com
`No @spaces.GPU function detected during startup`
Em **Settings → Settings → Hardware**, troque ZeroGPU → CPU se puder.
## Secrets (Settings → Variables and secrets)
| Name | Valor |
|------|--------|
| `HF_TOKEN` | token com permissão Inference |
| `CODERINSTRUC_HF_INFERENCE_MODEL` | `Qwen/Qwen3-Coder-30B-A3B-Instruct` (depois: seu adapter) |
| `CODERINSTRUC_HF_INFERENCE_ENDPOINT` | `https://router.huggingface.co/v1` (opcional) |
## Deploy a partir do GitHub
Repo código: `CodeModel` → pasta `spaces/coderinstruc-chat/`
Space alvo: **`amarorn/CoderInstruc`**
```bash
uv run python scripts/deploy_space.py --space amarorn/CoderInstruc
```
Ou GitHub Action `deploy-hf-space` (secret `HF_TOKEN`).
> Hosting Gradio no CPU free pode exigir [HF PRO](https://huggingface.co/pro). Sem PRO: `uv run coderinstruc space`
|