The OTTCOPS analyzer from ottcouture.eu combines Teachable Machine vision models with multimodal LLMs to produce structured JSON outputs. All branding and rights remain with ottcouture.eu; feedback or model submissions are welcome via otcdmin@outlook.com, Instagram @ottcouture.eu, or Discord discord.gg/GMMSqePfPh.
- 🌿 FastAPI core with Analyzer UI, config deck, OTTO chat (
/completions), and documented/tm-models*routes. - 🧠 Vision LLM switchboard for OpenAI, Ollama, or LM Studio with system prompt presets, multiple profiles, and server-side persistence for the Analyzer, Streams, and OTTO.
- 🧪 Teachable Machine depot with ZIP uploads (TFJS:
metadata.json/model.json/weights.binor Keras:keras_model.h5+labels.txt), registry, and default selection for the Analyzer. - 🧵 Model routing: the frontend lets you pick a TM slot per run; the choice is persisted in
app-settings.jsonfor reuse. - 🤖 OTTO grow chat – dedicated screen for cultivation questions with a defined system prompt.
- 📡 WiFi broadcast mode (mDNS/zeroconf) for hostnames like
ottcolab.localacross your LAN. - 📝 Prompt templates including locally saved custom presets directly in the Analyzer.
- 🗂️ Batch analysis with
/api/opencore/analyze-batch, tabs per image, and an overall report. - 🛠️ Debug panel with request ID, model version, and timings (UI toggle +
?debug=1). - 🔐 API token mode: custom base URL + token with code samples.
- 📤 Export bundle: JSON download, PDF report, and share links via
/api/opencore/share+ viewer (/share/<id>). - 🧷 ML-only analysis mode:
analysis_mode=mlreturns Teachable Machine JSON without GPT. - 🎥 Stream orchestration: snapshot/RTSP sources run as background jobs (5 s capture, 30 s batch) and produce automated reports.
- 🔄 Launch update check: on start the backend compares against
github.com/ottco-dev/ottcopsand offers an optionalgit pull.
- OPENCORE Analyzer is free to use only for private individuals and developer testing.
- Cannabis Social Clubs (CSCs) and companies—startups, MSOs, or service providers—must obtain a commercial license directly from ottcouture.eu before using this in any production or revenue context.
- Licensing & partnerships: otcdmin@outlook.com, Instagram @ottcouture.eu, Discord
discord.gg/GMMSqePfPh.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# optional if you want GPT calls
export OPENAI_API_KEY="sk-..."
# start the dev server
uvicorn app:app --reloadAt startup the server automatically compares your checkout to https://github.com/ottco-dev/ottcops. If a newer commit exists you will be prompted in the console (“Update now?”). Reply y or yes to run git pull; any other response keeps the current version. Set OTTC_SKIP_UPDATE_CHECK=1 to bypass this (e.g., in CI).
- Analyzer UI:
http://localhost:8000/ - OTTO grow chat:
http://localhost:8000/completions - Config hub + TM depot:
http://localhost:8000/config - Discord crew & support:
discord.gg/GMMSqePfPh - Documentation (HTML):
http://localhost:8000/doc/index.html
| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY |
for OpenAI flow | – | Key for GPT-4.1 mini or your preferred vision model. |
OPENAI_GPT_MODEL |
optional | gpt-4.1-mini |
LLM ID for cloud vision. |
TEACHABLE_MODEL_PATH |
optional | ./models/teachable_model |
Alternative path to a legacy Teachable model. |
Provider/LLM configuration from the config hub is stored locally (localStorage.cannabisLLMConfig) and server-side via /api/settings/llm. Multiple profiles can be created, activated, or deleted through /api/settings/llm/profiles; selections appear in the Analyzer, Streams, and OTTO. Together with the default Teachable Machine model, values are written to app-settings.json so Analyzer, batch/stream endpoints, and OTTO share the same provider settings and survive restarts.
- Install dependencies (
zeroconfships inrequirements.txt; runpip install zeroconfif you reuse an existing environment). - Start
uvicorn app:app --host 0.0.0.0 --port 8000so the server is reachable on your LAN. - Open
http://localhost:8000/configand scroll to “WiFi Broadcast & ottcolab.local”. - Set a hostname (we enforce
.local) and confirm the port, then click “Enable broadcast”. - Devices on the same network can reach
http://ottcolab.local:8000/. Feedback still welcome at otcdmin@outlook.com, Instagram @ottcouture.eu, or Discord.
- Export your Google Teachable Machine project as a TensorFlow bundle (
metadata.json,model.json,weights.bin) or a Keras (.h5) bundle withkeras_model.h5andlabels.txt. - Open
http://localhost:8000/configand use the “OTTCOUTURE Teachable Machine Depot” section. - After upload the model is stored under
/TM-models/<slug>and registered inTM-models/registry.json. - The server converts TFJS exports into a TensorFlow SavedModel (
tensorflowjsis declared as a dependency). Missing converters or broken bundles return clear errors. - The list view lets you mark any model as “Default in Analyzer”. The default is mirrored in
app-settings.json. - If no community model is selected, the Analyzer falls back to
TEACHABLE_MODEL_PATH(OPENCORE reference).
Required files: either
metadata.json,model.json,weights.binorkeras_model.h5pluslabels.txt. Missing parts are rejected during upload.
GET /– Analyzer landing page with model selectorGET /config– self-host configurator & TM depotGET /completions– OTTO grow chat UIPOST /analyze– image + prompt + optionalmodel_id+analysis_modePOST /api/opencore/analyze-ml– alias for ML-only calls (same as/analyzewithanalysis_mode=ml)POST /api/opencore/analyze-batch– multi-image analysis (FormData withfiles[])POST /api/opencore/share&GET /api/opencore/share/{id}– JSON share service (/share/{id}serves the viewer)POST /api/completions– OTTO chat endpoint (promptin JSON body)GET/POST/DELETE /api/opencore/streams*– manage snapshot/video streams including trigger endpointGET /tm-models– registry + default informationPOST /tm-models/upload– ZIP upload (file,model_type,display_name)POST /tm-models/default/{model_id}– set default modelDELETE /tm-models/default– clear default modelGET/POST/DELETE /api/settings/llm– persist provider/prompt configurationsGET /network/status,POST /network/announce,DELETE /network/announce– mDNS controls
All feature guides ship as static HTML pages served by FastAPI under /doc:
doc/prompts.html– prompts & custom presetsdoc/batch.html– batch analysis with API examplesdoc/debug.html– debug paneldoc/api_token_mode.html– professional modedoc/ui.html– UI extensions (drag & drop, theme, zoom, JSON fullscreen)doc/export.html– JSON/PDF/share exportdoc/home_automation.html– home-automation guide incl. curl, Python, Node-RED, Home Assistantdoc/streams.html– video & snapshot streams with API callsdoc/models.html– Teachable Machine (easy) and Label Studio/YOLO (pro) workflowsdoc/raspberry.html– Raspberry Pi mounting, camera setup, and edge scripting
.
├── app.py # FastAPI service + TM depot + WiFi broadcast + OTTO endpoint
├── static/
│ ├── index.html # Analyzer UI with model selector
│ ├── completions.html # OTTO grow chat
│ └── config.html # Self-host + TM depot console
├── TM-models/ # Versioned Teachable Machine bundles (ZIP uploads)
│ ├── README.md
│ └── registry.json # maintained at runtime
├── app-settings.json # Default model & provider settings (created if missing)
├── requirements.txt
├── README.md
└── LICENSE
- Brand & rights: ottcouture.eu — this is released as OpenCore, but all branding remains with ottcouture.eu.
- Feedback: otcdmin@outlook.com, Instagram @ottcouture.eu, Discord
discord.gg/GMMSqePfPh. - License: AGPL-3.0. Private use and developer testing are allowed; CSCs and companies must license commercial usage directly with ottcouture.eu.