File size: 1,664 Bytes
9580dce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: RotNot
emoji: 🧠
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---

# RotNot 🧠

A gamified cognitive-fitness web app — six exercise categories plus a Coding
Training module (code creation, debugging, AI code review, and architecture
discussions) with test-driven and LLM-judge grading.

This Space runs the Next.js app from a Docker container. The database is an
in-container SQLite file, migrated and seeded on each boot.

## Configuration

The app runs the AI features on a **Hugging Face token** (no Anthropic key
needed) by routing Anthropic-schema calls through HF's OpenAI-compatible
router. Set these as **Space secrets / variables** (Settings → Variables and
secrets):

- `HF_TOKEN` — **secret.** A Hugging Face token (free). Powers all AI features
  (Feynman, Debate, Reading, Coach, and the Coding written-answer judge).
  Anyone can use their own token. Without it, Coding's written grading falls
  back to an offline heuristic and other AI features are disabled.
- `HF_MODEL` — **variable** (optional). The open instruct model to serve, e.g.
  `meta-llama/Llama-3.1-8B-Instruct` (default), `meta-llama/Llama-3.3-70B-Instruct`,
  or `Qwen/Qwen2.5-72B-Instruct`. Larger models follow the JSON-output prompts
  more reliably.
- `LICHESS_TOKEN`, `CHESSCOM_USERNAME` — optional (chess puzzles / ratings).

> To use Anthropic directly instead, set `ANTHROPIC_API_KEY` and leave
> `HF_TOKEN` unset. `HF_TOKEN` takes priority when both are present.

> Note: container storage is ephemeral — XP/progress resets when the Space
> rebuilds or restarts. Attach HF persistent storage if you want it to persist.