| # Fish Anything — development |
|
|
| ## Models (each ≤32B) |
|
|
| | Model | Params | Role | |
| |-------|--------|------| |
| | [openbmb/MiniCPM4.1-8B](https://huggingface.co/openbmb/MiniCPM4.1-8B) | 8B | Bait appeal, fish lore, reel scoring, narration | |
| | [black-forest-labs/FLUX.2-klein-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B) | 4B | Bait & fish sprites (fallback) | |
| | [black-forest-labs/FLUX.2-klein-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-9B) | 9B | Bait & fish sprites (primary) | |
|
|
| Text and image run on separate Modal containers (A10G + A100). The Hugging Face Space is a CPU Gradio host that calls Modal remotely. |
|
|
| ## Tech |
|
|
| - **Frontend:** `gr.Server` + static HTML/CSS/JS |
| - **Backend:** FastAPI routes on the Gradio server; per-session game state |
| - **Modal:** `modal deploy modal_app.py` — `TextGenerator` + `ImageGenerator` |
| - **Warmup:** Modal containers wake on Space boot and page load |
|
|
| ## Space secrets (live play) |
|
|
| | Secret | Value | |
| |--------|-------| |
| | `MODAL_TOKEN_ID` | From `modal token new` or [Modal settings](https://modal.com/settings) | |
| | `MODAL_TOKEN_SECRET` | Paired secret | |
| | `LLM_MODE` | `modal` | |
| | `IMAGE_MODE` | `modal` | |
|
|
| Deploy Modal once: `modal deploy modal_app.py` (needs `huggingface-secret` for FLUX weights). |
|
|
| ## Local dev |
|
|
| ```bash |
| python -m venv .venv && source .venv/bin/activate |
| pip install -r requirements.txt |
| LLM_MODE=mock IMAGE_MODE=mock python app.py |
| # http://127.0.0.1:7860 |
| ``` |
|
|