--- title: TinyModel1Space emoji: 🤗 colorFrom: blue colorTo: indigo sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false --- # TinyModel1Space **Universal Brain chat** — natural-language routing, generative replies, FAQ RAG, SQLite memory, and TinyModel classification. Uses encoder **`HyperlinksSpace/TinyModel1`** (see also [model card](https://huggingface.co/HyperlinksSpace/TinyModel1)). - **App URL:** [https://hyperlinksspace-tinymodel1space.hf.space](https://hyperlinksspace-tinymodel1space.hf.space) - **Source:** [https://github.com/HyperlinksSpace/TinyModel](https://github.com/HyperlinksSpace/TinyModel) ### Secrets (recommended) - `HF_TOKEN` — read token so Hub model downloads are reliable (same as classic classifier Space). - `GOOGLE_CSE_API_KEY` — Google Cloud API key restricted to **Custom Search API** (enables `/web` and smart-route **web search** in chat). ### Optional environment variables - `HORIZON2_MODEL` — Hugging Face id for the **generative** instruct model (default in code: SmolLM2-360M-Instruct if unset in image). - `GOOGLE_CSE_CX` — Programmable Search Engine id (`cx` from the [PSE control panel](https://programmablesearchengine.google.com/controlpanel/all)); required together with `GOOGLE_CSE_API_KEY` for web search. - `GOOGLE_CSE_NUM` — results per request, 1–10 (default 5). - `GOOGLE_CSE_SAFE` — optional safe-search level for Google `cse.list` (e.g. `off`, `active`). ### Note First CPU start can take several minutes (downloads + two models). For faster UX, enable a GPU Space or a smaller `HORIZON2_MODEL`.