NINA / README.md
Malina
Claude Fable 5.1
v0.90: scoped single-use tokens, hardened link fetch, 45-minute cap, whole-video digest, one classification call, no OCR
1d697a7
|
Raw History Blame
2.05 kB
---
title: NINA
emoji: ๐Ÿš€
colorFrom: gray
colorTo: red
sdk: gradio
sdk_version: 6.14.0
python_version: '3.13'
app_file: app.py
pinned: false
license: apache-2.0
short_description: Chat with a video, grounded only in the footage
---
# NINA โ€” Neural Information & Narrative Abstraction
Upload a recording (or paste a link from a known video site) and chat about it. NINA
answers using **only** the video: what is *said* (Whisper, two passes, with a
reliability gate), what is *shown* (CLIP retrieval and a vision-language model that
reads the sampled keyframes), speaker turns where available, and a whole-transcript
digest for summaries. The app that drives this Space is **https://app.nnlabs.pl/nina**.
## Running this Space
* **Secrets:** `HF_TOKEN` (inference providers; the pyannote models are gated, accept
their terms on this token) and `NINA_SIGNING_SECRET` (shared with the website's
Worker; without it every request is refused). Optional: `YT_DLP_COOKIES_B64`,
`YT_DLP_PROXY` for pasted links; `TOKEN_REQUIRE_SCOPE=1` once the Worker emits
scoped tokens.
* **Hardware:** CPU (`cpu-upgrade`); sleeps after 15 minutes and takes about two
minutes to wake (Whisper, CLIP and the cross-encoder load at start).
* **Limits:** 500 MB and 45 minutes per video; uploads are purged after 15 minutes.
## API
Every endpoint takes a signed, single-use token minted by the website for that
endpoint's scope. There is no anonymous access.
| api_name | inputs | output |
| --- | --- | --- |
| `chat` | video (optional), payload JSON `{messages, transcript, force_analyze, force_answer, has_video}`, token | streams `[answer, analyzed, transcript]` |
| `route` | payload JSON, token | `analyze_first` / `confirm` / `answer` |
| `fetch` | url, token | `[video, title_or_error]` |
| `run` | video, prompt, token | streamed answer (legacy single shot) |
Refusals and failures start with `โ›”`; the website shows them as errors and does not
store them as answers.
Config reference: https://huggingface.co/docs/hub/spaces-config-reference