Bet or skip: Gemma reads the bet slip on my laptop, and the slip's own arithmetic checks Gemma
Description and use
betorskip uses Gemma 4 and Tesseract to read bet slips, verify arithmetic, and apply bankroll rules locally, outputting BET, SKIP or CHECK.
Problem
Betting rules are hard to apply consistently; bettors need a tool that reads a bet slip, verifies all numbers, and enforces their bankroll rules locally without sharing data.
Outcome
betorskip accurately classifies 24 out of 24 new‑style screenshots, with only one misclassification, and provides transparent arithmetic checks and rule enforcement locally.
Workflow
- Paste or point to a bet slip (text or screenshot).
- Gemma 4 reads the slip via Ollama on localhost, returning facts with exact source quotes.
- Code validates each fact: quote present, number matches, label correct, odds formatted as printed.
- Code checks slip’s internal arithmetic: stake×odds equals return, legs multiply to total odds, leg count matches market type.
- Apply user‑defined bankroll rules from a TOML file (max stake %, house margin limits, etc.).
- Output one word: BET, SKIP, or CHECK, with explanatory note.
Evidence
betorskip takes a bet slip (pasted text or a screenshot) and gives one word back:
Python, no dependencies, about 1,060 lines plus 134 tests. It needs Ollama with gemma4:12b, and Tesseract for screenshots.
A fact survives only if its quote is really on the slip, its number is really in the quote, and the right label sits next to it.
The wrong BET is the number to keep in mind. Tesseract dropped the "Draw 3.20" line of a market where the house keeps 14.4%; with two prices out of three there is no margin to compute, so the margin rule had nothing to apply to and the slip passed.
- Record date: 2026-10-13T13:55:54.260Z