Spaces:
Sleeping
Sleeping
|
Download README.md from scythe410/vectorscape-reducer: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/spaces/scythe410/vectorscape-reducer/resolve/main/README.md
- Command line
-
hf download hf://spaces/scythe410/vectorscape-reducer/README.md
-
curl -L -o README.md https://huggingface.co/spaces/scythe410/vectorscape-reducer/resolve/main/README.md
1.97 kB
metadata
title: VectorScape Reducer
emoji: π
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
short_description: Embeddings + dim reduction + clustering for VectorScape.
VectorScape Reducer
FastAPI service that turns text rows into 3D coordinates + clusters for the
VectorScape web app. The web app calls this service over HTTPS with a shared
secret in the X-Reducer-Secret header.
Endpoints
GET /healthβ liveness probe (unauthenticated).POST /embed-reduceβ embed β optional PCA β PaCMAP/UMAP β HDBSCAN, then writepoints+clustersrows to Supabase. RequiresX-Reducer-Secret.GET /status/{project_id}β poll project status. RequiresX-Reducer-Secret.POST /bridgeβ explain the gap between two clusters via LLM. RequiresX-Reducer-Secret.
Required environment
Set these as secrets in the Space settings (Settings β Variables and secrets):
| Name | Purpose |
|---|---|
REDUCER_SHARED_SECRET |
Must match the value set on the web app. Auth fails closed if unset. |
DATABASE_URL |
Supabase Postgres connection string (service-role; bypasses RLS). |
OPENAI_API_KEY |
Optional. Only used when callers request embed_model=openai or for /bridge. |
GEMINI_API_KEY |
Optional. /bridge fallback when OPENAI_API_KEY isn't set β routes through Gemini's OpenAI-compatible endpoint (free tier on AI Studio). |
REDUCER_ASYNC_THRESHOLD |
Set to 999999 here β no Redis on this Space, so all jobs must run inline. |
Notes
- The
all-MiniLM-L6-v2model is pre-downloaded at image build time, so the first request after a cold start doesn't pay the model download cost. - Inline-only on this Space (no arq worker, no Redis). Datasets above the threshold will time out the HTTP request β small/demo CSVs only.
- Source of truth: this directory is mirrored from the
vector-scapemonorepo'sservices/reducer/.