|
| 1 | +# LangSlice — Install (v0.1 developer preview) |
| 2 | + |
| 3 | +The v0.1 Tauri desktop app is a **developer preview**: it wraps the |
| 4 | +Python `langslice-harness` CLI and needs Python 3.10+ available on |
| 5 | +`PATH`. The estimation, registration, and quick-affine features all |
| 6 | +shell out to Python at runtime — the installer alone is not enough. |
| 7 | + |
| 8 | +For the no-prereq option, use the browser version at |
| 9 | +[greenpolo.github.io/LangSlice](https://greenpolo.github.io/LangSlice). |
| 10 | +The two are deliberately different products: the web demo is |
| 11 | +intentionally limited, the Tauri app is the feature-rich path. |
| 12 | + |
| 13 | +## Prereqs (one-time setup) |
| 14 | + |
| 15 | +### 1. Python 3.10+ |
| 16 | + |
| 17 | +Any standard Windows install works. Confirm: |
| 18 | + |
| 19 | +```powershell |
| 20 | +python --version |
| 21 | +``` |
| 22 | + |
| 23 | +If the command isn't found, install from |
| 24 | +[python.org/downloads](https://www.python.org/downloads/windows/) and |
| 25 | +make sure the installer's "Add python.exe to PATH" option is checked. |
| 26 | + |
| 27 | +### 2. `langslice-harness` package |
| 28 | + |
| 29 | +Clone the repo and install it in editable mode: |
| 30 | + |
| 31 | +```powershell |
| 32 | +git clone https://github.com/greenpolo/LangSlice.git |
| 33 | +cd LangSlice |
| 34 | +python -m venv .venv |
| 35 | +.venv\Scripts\activate |
| 36 | +pip install -e . |
| 37 | +``` |
| 38 | + |
| 39 | +This pulls in the core deps (`brainglobe-atlasapi`, `numpy`, `scipy`, |
| 40 | +`pillow`, `tifffile`, `itk-elastix`, `google-genai`, …). |
| 41 | + |
| 42 | +### 3. A BrainGlobe atlas |
| 43 | + |
| 44 | +The Tauri app's first launch lets you pick + download an atlas through |
| 45 | +its UI, but you can pre-warm one from the command line: |
| 46 | + |
| 47 | +```powershell |
| 48 | +python -c "from brainglobe_atlasapi import BrainGlobeAtlas; BrainGlobeAtlas('allen_mouse_25um')" |
| 49 | +``` |
| 50 | + |
| 51 | +This downloads to `~/.brainglobe/` and is shared across all tools. |
| 52 | + |
| 53 | +### 4. (Optional) Gemini API key |
| 54 | + |
| 55 | +For position estimation via cloud models, get a key from |
| 56 | +[aistudio.google.com](https://aistudio.google.com/app/apikey) and paste |
| 57 | +it into the app's **API Keys** tab. |
| 58 | + |
| 59 | +## Install the Tauri app |
| 60 | + |
| 61 | +1. Download `LangSlice_0.1.0_x64-setup.exe` (NSIS, ~40 MB) from the |
| 62 | + [Releases page](https://github.com/greenpolo/LangSlice/releases). |
| 63 | +2. Double-click to install. Windows SmartScreen may warn that the |
| 64 | + installer is unsigned — click **More info → Run anyway**. |
| 65 | +3. The app installs to `Program Files\LangSlice\`. Uninstall via the |
| 66 | + standard **Add or Remove Programs**. |
| 67 | +4. Launch from the Start menu (`LangSlice`). |
| 68 | + |
| 69 | +The `.msi` variant (`LangSlice_0.1.0_x64_en-US.msi`) is also available |
| 70 | +for IT-managed deployments. |
| 71 | + |
| 72 | +## Verify it works |
| 73 | + |
| 74 | +On launch, the app's status row should show: |
| 75 | + |
| 76 | +- **Atlas**: `allen_mouse_25um` loaded (or pick another from the Atlas |
| 77 | + dropdown if you downloaded one). |
| 78 | +- **API Keys** tab: at minimum a Gemini API key for cloud estimation, |
| 79 | + or set up a local model via the **Local Models** tab. |
| 80 | + |
| 81 | +Try the **Load Demo Brain** button and run an estimate on one slice. If |
| 82 | +the estimate completes, the Python pipeline is wired up correctly. |
| 83 | + |
| 84 | +## Troubleshooting |
| 85 | + |
| 86 | +- **"Failed to spawn python"** — `python` isn't on PATH for the user |
| 87 | + account that launched the app. Open a fresh PowerShell, run `python |
| 88 | + --version`. If it works there but not from the app, log out and back |
| 89 | + in (PATH changes don't always propagate to running sessions). |
| 90 | +- **"No module named langslice_harness"** — the `python` on PATH isn't |
| 91 | + the one with `langslice-harness` installed. Either install into the |
| 92 | + global Python, or update PATH so your venv's `python.exe` wins. |
| 93 | +- **Atlas operations hang on first run** — BrainGlobe is downloading |
| 94 | + the atlas (~500 MB for `allen_mouse_25um`). Check |
| 95 | + `~/.brainglobe/` for progress. |
| 96 | + |
| 97 | +## What ships in the installer |
| 98 | + |
| 99 | +- The Tauri shell + UI (~30 MB) |
| 100 | +- The `litert-lm` sidecar (~10 MB) + supporting DLLs for fully-offline |
| 101 | + inference with the LangSlice-Gemma 4 model. The sidecar isn't auto- |
| 102 | + started in v0.1; spin it up via the **Local Models** tab if you want |
| 103 | + to use the local model instead of the Gemini API. Model weights are |
| 104 | + not bundled — the Local Models tab links to the Hugging Face page. |
| 105 | + |
| 106 | +## Roadmap |
| 107 | + |
| 108 | +A future v0.2 will bundle Python + `langslice-harness` so the installer |
| 109 | +is fully self-contained and no manual setup is needed. Track progress |
| 110 | +on the [v0.2 milestone](https://github.com/greenpolo/LangSlice/milestones). |
0 commit comments