diff --git a/.gitignore b/.gitignore index 9f2e848..785ac75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store __pycache__/ +googlers.txt diff --git a/img/manual/01-cover.jpg b/img/manual/01-cover.jpg new file mode 100644 index 0000000..d4ebfe2 Binary files /dev/null and b/img/manual/01-cover.jpg differ diff --git a/img/manual/02-open.jpg b/img/manual/02-open.jpg new file mode 100644 index 0000000..7b7cbba Binary files /dev/null and b/img/manual/02-open.jpg differ diff --git a/img/manual/03-link.jpg b/img/manual/03-link.jpg new file mode 100644 index 0000000..dd23a94 Binary files /dev/null and b/img/manual/03-link.jpg differ diff --git a/img/manual/04-follow.jpg b/img/manual/04-follow.jpg new file mode 100644 index 0000000..2e804bc Binary files /dev/null and b/img/manual/04-follow.jpg differ diff --git a/img/manual/05-adjust.jpg b/img/manual/05-adjust.jpg new file mode 100644 index 0000000..1504f32 Binary files /dev/null and b/img/manual/05-adjust.jpg differ diff --git a/img/manual/06-care.jpg b/img/manual/06-care.jpg new file mode 100644 index 0000000..9690d12 Binary files /dev/null and b/img/manual/06-care.jpg differ diff --git a/manual.html b/manual.html index d7ae3e5..d725f35 100644 --- a/manual.html +++ b/manual.html @@ -33,7 +33,7 @@
Bilateral stimulation for therapy — on whatever screen you already have.
- +

What is this?

A gentle moving dot (and optional sound) that a patient follows with their eyes while you guide the session. It runs in any web browser — @@ -41,7 +41,7 @@

- +

1Open it

Open the site on your computer. You'll see one big green START button and a few large sliders. That's the whole @@ -49,7 +49,7 @@

- +

2Give the patient a screen

Easiest: tap Open patient screen and turn that window to face them. Or tap Copy link and open it on their @@ -57,7 +57,7 @@

- +

3Press start

The dot glides left and right. The patient follows it with their eyes while you lead the session. Sound can tick from side to side too @@ -65,7 +65,7 @@

- +

4Make it comfortable

Slide between turtle and rabbit until the pace feels right. Change the size, the color, the sound — the patient's screen updates @@ -73,7 +73,7 @@

- +

⚠️ Go gently

Ask about seizure history before showing moving or pulsing visuals. Bilateral stimulation can bring up strong feelings — this tool assists diff --git a/tools/gen_manual_art.py b/tools/gen_manual_art.py index a2103aa..68456e0 100644 --- a/tools/gen_manual_art.py +++ b/tools/gen_manual_art.py @@ -11,8 +11,8 @@ KEY = os.environ.get("GEMINI_API_KEY") if not KEY: sys.exit('set GEMINI_API_KEY in the environment first') -MODELS = ['gemini-2.5-flash-image', 'gemini-2.5-flash-image-preview', - 'gemini-2.0-flash-preview-image-generation'] +MODELS = ['gemini-3-pro-image', 'gemini-3.1-flash-image', + 'gemini-2.5-flash-image'] STYLE = ("Flat vector cartoon illustration in a warm, friendly picture-book style. " "Soft rounded shapes, thick clean outlines, muted palette of deep teal, warm coral, " @@ -52,15 +52,17 @@ def generate(prompt): '%s:generateContent?key=%s' % (model, KEY)) req = urllib.request.Request(url, data=body, headers={'Content-Type': 'application/json'}) - try: - with urllib.request.urlopen(req, timeout=120) as r: - data = json.load(r) - for part in data['candidates'][0]['content']['parts']: - if 'inlineData' in part: - return base64.b64decode(part['inlineData']['data']), model - last = 'no image part in response from %s' % model - except Exception as e: - last = '%s: %s' % (model, e) + for attempt in (1, 2): + try: + with urllib.request.urlopen(req, timeout=300) as r: + data = json.load(r) + for part in data['candidates'][0]['content']['parts']: + if 'inlineData' in part: + return base64.b64decode(part['inlineData']['data']), model + last = 'no image part in response from %s' % model + break # empty response: don't retry same model, fall through + except Exception as e: + last = '%s (try %d): %s' % (model, attempt, e) raise RuntimeError(last)