TinyModel1Space / README.md
anriltine's picture
Deploy TinyModel1Space from GitHub Actions
32907e2 verified
---
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`.