Spaces:
Sleeping
Sleeping
File size: 1,668 Bytes
d66225e e1fc9bc d66225e e1fc9bc d66225e e1fc9bc | 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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | ---
title: MyVillage Activity Composition API
emoji: 🧩
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
models:
- mjpsm/activity-composition-model-400-qwen3.5-0.8b-gguf
---
# MyVillage Activity Composition API
A simple FastAPI API that loads the Q8_0 GGUF directly with `llama-cpp-python`.
There is **no separate llama-server process**.
The only web server is Uvicorn:
```text
uvicorn main:app --host 0.0.0.0 --port 7860
```
## Model
- Source model: `mjpsm/activity-composition-model-400-qwen3.5-0.8b`
- GGUF repo: `mjpsm/activity-composition-model-400-qwen3.5-0.8b-gguf`
- GGUF file: `activity-composition-model-400-qwen3.5-0.8b-Q8_0.gguf`
- Runtime: `llama-cpp-python`
## Endpoints
- `GET /`
- `GET /health`
- `GET /model`
- `POST /generate`
- `GET /docs`
## Request
```json
{
"progression": {
"knowledge_state": "PARTIAL",
"demonstrated_state": [
"Created the initial animation and added the first set of assets"
],
"next_gap": "Finish and polish the remaining animation work",
"activity_plan": {
"action": "complete the remaining animation work",
"target": "the animation",
"avoid_repeating": [
"recreating the initial animation",
"re-adding assets already included"
]
}
}
}
```
## Response
```json
{
"output": {
"activity_title": "string",
"activity_description": "string"
}
}
```
## Private GGUF repo
If the GGUF repo is private, add a Space secret named:
`HF_TOKEN`
with read access to the model repository.
## Architecture
```text
Client
↓
Uvicorn
↓
FastAPI
↓
llama-cpp-python
↓
Q8_0 GGUF
↓
validated Composition JSON
```
|