Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files
README.md
CHANGED
|
@@ -105,36 +105,4 @@ Bonus quests this project aims for:
|
|
| 105 |
|
| 106 |
Myco's mind is **`google/gemma-3-1b-it`** (Gemma 3 1B Instruct), loaded **locally** via `transformers` — there are no Hugging Face Inference API calls. The model runs on GPU if one is available, otherwise CPU.
|
| 107 |
|
| 108 |
-
Environment variables:
|
| 109 |
-
- `MYCO_MODEL_ID` — override the model (default: `google/gemma-3-1b-it`).
|
| 110 |
-
- `HF_BUILD_SMALL_HACKATHON_TOKEN` — Hugging Face access token used when downloading the model weights, needed if the chosen model is gated.
|
| 111 |
-
|
| 112 |
-
If the model fails to load, or a generation call errors, Myco falls back to hand-written, in-character responses for every action — discovering, picking, studying, collecting, whisper-following, eating, and chatting — so the game never crashes or goes silent.
|
| 113 |
-
|
| 114 |
Every successful generation (narrative, in-game action, or chat) is also appended to a running, tagged log that streams to the live log panel via a polling timer, so you can watch Myco "think" as it happens.
|
| 115 |
-
|
| 116 |
-
## Local development
|
| 117 |
-
|
| 118 |
-
```bash
|
| 119 |
-
pip install -r requirements.txt
|
| 120 |
-
python app.py
|
| 121 |
-
```
|
| 122 |
-
|
| 123 |
-
The first run downloads and loads `google/gemma-3-1b-it`, which can take a little while on CPU. Open the local Gradio URL printed in the terminal once it's ready.
|
| 124 |
-
|
| 125 |
-
## Hugging Face Space
|
| 126 |
-
|
| 127 |
-
This repo runs directly as a Gradio Space. Hugging Face Spaces reads the metadata at the top of this README, installs `requirements.txt`, and runs `app.py`.
|
| 128 |
-
|
| 129 |
-
To deploy manually:
|
| 130 |
-
1. Create or open the Space at https://huggingface.co/spaces/byte-vortex/Myco.
|
| 131 |
-
2. Make sure the Space SDK is **Gradio**.
|
| 132 |
-
3. Set the `HF_BUILD_SMALL_HACKATHON_TOKEN` secret if `google/gemma-3-1b-it` requires accepting Gemma's license on your account.
|
| 133 |
-
4. Upload or push this repository's files to the Space repository.
|
| 134 |
-
5. The Space installs `gradio==6.16.0` plus `transformers`/`torch` from `requirements.txt` and starts from `app.py`.
|
| 135 |
-
|
| 136 |
-
The required runtime files are `README.md`, `app.py`, `requirements.txt`, `data/`, `game/`, `models/`, and `ui/`.
|
| 137 |
-
|
| 138 |
-
## Optional deploy helper
|
| 139 |
-
|
| 140 |
-
`scripts/deploy_space.py` is optional. It skips safely when `HF_BUILD_SMALL_HACKATHON_TOKEN` is not configured, and uploads to `byte-vortex/Myco` only when that token is present.
|
|
|
|
| 105 |
|
| 106 |
Myco's mind is **`google/gemma-3-1b-it`** (Gemma 3 1B Instruct), loaded **locally** via `transformers` — there are no Hugging Face Inference API calls. The model runs on GPU if one is available, otherwise CPU.
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
Every successful generation (narrative, in-game action, or chat) is also appended to a running, tagged log that streams to the live log panel via a polling timer, so you can watch Myco "think" as it happens.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|