Fetches a random Hacker News comment and scores it with Laya, a local System One decision model. No LLM, no account, no API key.
- uv (Python 3.13 is installed automatically)
- Internet for the Hacker News API and the one-time model download (~2.2 GB,
cached in ~/.cache/huggingface)
uv run main.py
uv run main.py --comment "This is the best explanation I have ever read!"
uv run main.py --min-points 50
uv run main.py --download-only # cache all Laya checkpoints and exitWith no flags, it prints a fetching notice, the comment, and the analysis:
Fetching a random Hacker News comment...
Comment by simonw
"Is this meant to link to the article..."
---------- analysis ----------
Sentiment: Neutral ████████░░ 79%
Sarcasm: No (not sarcastic) █████████░ 89%
Emotion: Neutral ████████░░ 76%
Toxicity: Not toxic █████████░ 93%
Constructive: Not constructive ██░░░░░░░░
Useful: █░░░░░░░░░ 12%
- Picks a random story with a score above --min-points(default 10) from the official Hacker News Firebase API, then a random comment from it. Comment scores are not exposed by any public API, so the filter applies to the story score.
- Runs one Router().predict()call with 7 typed questions (choice/score/noul) in a single forward pass — no text is generated, so nothing is parsed and nothing is hallucinated.
- Renders the probabilities with Jinja2 templates.
After the first run, analysis is fully offline (HF_HUB_OFFLINE=1).