Spaces:
Running
Running
Add README with HF configuration
Browse files
README.md
CHANGED
|
@@ -1,66 +1,33 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
4. **Creates tier list** at `champ-stats/{patch}/tier-list.json`
|
| 11 |
|
| 12 |
## Output Structure
|
| 13 |
|
| 14 |
```
|
| 15 |
-
champ-stats/
|
| 16 |
-
|
| 17 |
-
β βββ meta.json # Patch metadata
|
| 18 |
-
β βββ tier-list.json # Sorted tier list
|
| 19 |
-
β βββ 266.json # Aatrox stats
|
| 20 |
-
β βββ 103.json # Ahri stats
|
| 21 |
-
β βββ ...
|
| 22 |
-
βββ 16.3/
|
| 23 |
-
β βββ ...
|
| 24 |
```
|
| 25 |
|
| 26 |
-
##
|
| 27 |
|
| 28 |
-
|
| 29 |
-
{
|
| 30 |
-
"champion_id": 266,
|
| 31 |
-
"total_games": 15420,
|
| 32 |
-
"win_rate": 0.5234,
|
| 33 |
-
"by_role": {
|
| 34 |
-
"TOP": {"games": 12000, "win_rate": 0.5240},
|
| 35 |
-
"JUNGLE": {"games": 3420, "win_rate": 0.5210}
|
| 36 |
-
},
|
| 37 |
-
"by_rank": {
|
| 38 |
-
"DIAMOND": {"games": 3000, "win_rate": 0.5100},
|
| 39 |
-
"MASTER": {"games": 1500, "win_rate": 0.5050}
|
| 40 |
-
},
|
| 41 |
-
"matchups": [
|
| 42 |
-
{"enemy_champion_id": 54, "games": 500, "win_rate": 0.4800},
|
| 43 |
-
...
|
| 44 |
-
]
|
| 45 |
-
}
|
| 46 |
-
```
|
| 47 |
|
| 48 |
## Environment Variables
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
| `HF_TOKEN` | (required) | HuggingFace API token |
|
| 53 |
-
| `DATASET_REPO` | `ArcaThread/arca-thread-priors` | Target dataset |
|
| 54 |
-
| `PROCESS_INTERVAL_SECONDS` | `3600` | Run interval (1 hour) |
|
| 55 |
-
| `MIN_SAMPLE_SIZE` | `100` | Minimum games for inclusion |
|
| 56 |
-
|
| 57 |
-
## API Endpoints
|
| 58 |
-
|
| 59 |
-
- `GET /` - Basic info
|
| 60 |
-
- `GET /health` - Status and stats
|
| 61 |
-
- `GET /trigger` - Manually trigger processing
|
| 62 |
-
- `GET /patch/{patch}` - Patch processing status
|
| 63 |
-
|
| 64 |
-
## Deployment
|
| 65 |
-
|
| 66 |
-
Deploy to HuggingFace Spaces as a Docker space. Set `HF_TOKEN` as a secret.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Arca Processor
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_file: app.py
|
| 8 |
+
pinned: false
|
| 9 |
+
---
|
| 10 |
|
| 11 |
+
# Arca Processor
|
| 12 |
|
| 13 |
+
Pre-computed champion stats generator for ArcaThread.
|
| 14 |
|
| 15 |
+
## Purpose
|
| 16 |
+
|
| 17 |
+
This space processes matchup-matrix parquet files from `arca-thread-priors` dataset and generates lightweight JSON files per champion.
|
|
|
|
| 18 |
|
| 19 |
## Output Structure
|
| 20 |
|
| 21 |
```
|
| 22 |
+
champ-stats/{patch}/{championName}.json
|
| 23 |
+
champ-stats/{patch}/tier-list.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
```
|
| 25 |
|
| 26 |
+
## Schedule
|
| 27 |
|
| 28 |
+
Runs hourly to detect new patches and update stats.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
## Environment Variables
|
| 31 |
|
| 32 |
+
- `HF_TOKEN` - HuggingFace API token
|
| 33 |
+
- `DATASET_REPO` - Source dataset (default: ArcaThread/arca-thread-priors)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|