Spaces:
Paused
Paused
Commit History
-
v0.90: scoped single-use tokens, hardened link fetch, 45-minute cap, whole-video digest, one classification call, no OCR
Malina +1: Claude Fable 5.1- auth.py shared with LUNA: scope + iat checks, jti persisted across restarts, TOKEN_REQUIRE_SCOPE - fetch.py: known hosts only, public-address check, no generic extractor, cookies filtered by domain, 240 s deadline, 400 MB cap, temp dirs swept - pipeline: duration cap, every refusal prefixed with the error marker, stage timings, int16 audio cache, ingest locks pruned - chat: one classify call (OFF/ANALYZE/ANSWER), server-side size caps, fixed error sentences, NEED_VIDEO handshake removed - synthesis: whole-transcript digest for summaries; language detector moved to lang.py; fmt_time m:ss / h:mm:ss - visual: seek-based frame sampling past five minutes - OCR removed (rapidocr, onnxruntime, libgl1); yt-dlp pinned; max_file_size at the door; README rewritten - tests: auth, fetch validation, language and time formatting (55) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1d697a7
-
NINA dostaje osobowosc: montazystka, ktora mieszka w internecie
Malina +1: Claude Opus 5 (1M context)Do tej pory NINA byla "a sharp assistant" w trzech promptach i tyle. Teraz ma jedno zrodlo glosu (persona.py) i wlasna tozsamosc: uczyla sie czytac obraz z cudzych plikow, mysli ujeciami i timecodem, zyje w internecie tak samo jak ARIA, tylko siedzi przy pliku zamiast w rozmowach. Start z tonu 7/10 oficjalnego, schodzi do 5 przy luznym pisaniu i idzie do 8-9 przy utrzymanym rejestrze formalnym. Pan i Pani to w polszczyznie zwykla uprzejmosc, wiec nie podnosza rejestru. Trzy zasady, na ktorych to stoi: - glos NIGDY nie wygrywa z regulami. Kazdy blok konczy sie zdaniem, ze jezyk, ugruntowanie, dlugosc i format sa wiazace ponad nim. - kazda sciezka dostaje tylko te zmysly, ktore ma. Prompt tekstowy (bez klatek, a do tego awaryjny dla sciezki wizyjnej) ma wprost zakaz mowienia jak naoczny swiadek. - gadanie o montazu ograniczone do tego, co widac w podanym materiale: napis sprzeczny z tym, co pada, teza postawiona nad kadrem, ktory jej nie pokazuje. Bez ciec, muzyki i wstawionyc…5af6715
-
Fix diarization hub kwarg, yt-dlp cookies, stronger output formatting
Malina +1: Claude Opus 4.8- diarize: shim huggingface_hub.hf_hub_download/snapshot_download to translate the removed use_auth_token kwarg → token, so pyannote 3.3.2 loads on hub 1.x (fixes "Diarization unavailable: ... unexpected keyword argument 'use_auth_token'"). - fetch: support YouTube/Facebook cookies (YT_DLP_COOKIES[_B64] secret) + a real browser UA, the actual fix for "Sign in to confirm you're not a bot / age" on cloud IPs; still best-effort. - synthesis/chat: enforce a strong "CRITICAL OUTPUT FORMAT" (headings, bullets, numbered steps, tables for comparisons; no walls of text) for scannable answers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>d0ff022
-
Re-analysis confirm route + adaptive answer formatting
Malina +1: Claude Opus 4.8- chat/app: add a 'route' endpoint (route_decision) so the website can ask the user before re-watching the video ("NINA wants to analyze the video again"); add force_answer ("Don't" → answer from context) alongside force_analyze. - synthesis/chat: answers now adapt their shape to the question (Markdown) — short paragraphs, bullet lists, bold, optional headings for long/multi-part answers — instead of one prose block. Shared _FORMAT_GUIDE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>7c88737 -
NINA: stop identity hallucination, fix diarization shims, drop output header
Malina +1: Claude Opus 4.8- VLM prompt: forbid naming a person from appearance/resemblance (the "Mark Twain" hallucination). Only use a name if it's written on screen or spoken; otherwise refer generically and say identity can't be determined. - diarize.py: pyannote 3.3.2 hits more removed torchaudio symbols on 2.11 (list/get/set_audio_backend); stub the whole removed I/O-backend API in one place. - synthesis.format_output: remove the "🧠 Based on uploaded video…" pre-message; output is now just the answer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>6dd7da1 -
NINA: VLM-centric synthesis — the model now actually sees the video
Malina +1: Claude Opus 4.8Pivot the answer engine from CLIP-tags + text-LLM to a vision-language model (Qwen3-VL-8B via HF Inference) that consumes sampled keyframes + the transcript: - frames.py: pick representative timestamps (region midpoints + even context) and extract downscaled base64 keyframes. - synthesis.vlm_synthesize_stream: sends frames + speech transcript + speaker labels to the VLM; reads on-screen text natively, describes who/what is shown, fuses vision with speech. Falls back to the text LLM if the VLM is unavailable. One call per request → no extra inference cost beyond the image tokens. - pipeline: route synthesis through the VLM with keyframes; disable the OCR rung (the VLM reads text far better); add a per-video ingest lock to stop the duplicate concurrent ingestion seen in the logs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>33ec6e1 -
NINA Phase 2: vocal isolation + speaker diarization + name attribution
Malina +1: Claude Opus 4.8- enhance.py: torchaudio Hybrid Demucs vocal isolation (best-effort, chunked). In ingest, when the first ASR pass is unreliable (musical/distorted), isolate the voice and re-transcribe; keep it only if it scores better. - diarize.py: pyannote speaker diarization → per-segment speaker labels, friendly Speaker 1/2 display names, multilingual self-introduction → name roster, and region speaker annotation. All best-effort (no-op if pyannote/token unavailable). - pipeline: third parallel ingest branch (Whisper ∥ CLIP ∥ diarization); speakers attached after join; region speakers + speaker note threaded to synthesis. - synthesis: fragments tagged with speaker; system prompt attributes lines and uses a self-introduced name for all of that speaker's lines (handles the gamer 'I won' case) — done inside the single existing LLM call (no extra inference credits). - requirements: torchaudio==2.12.0, pyannote.audio==3.3.2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>e2c96b8 -
NINA: anti-hallucination ASR + honest low-confidence handling (Phase 1)
Malina +1: Claude Opus 4.8On noisy/musical/distorted audio Whisper fabricates fluent nonsense, and the LLM was reporting it as fact. Now: - transcribe_fast gets hallucination guards (no_speech/log_prob/compression-ratio thresholds, condition_on_previous_text=False) and records no_speech_prob + compression_ratio per segment - transcript_reliability() scores the transcript; an unreliable one (poor mean logprob / mostly weak / mostly no-speech) is flagged - synthesis: when unreliable, the system prompt tells the model the audio is hard to make out and to say so plainly instead of inventing meaning for garbled text Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>6acd603 -
NINA v0.82 — upload compression, natural multilingual answers, robust precise
Malina +1: Claude Opus 4.8- compress.py + pipeline guard: reject uploads >200 MB, ffmpeg-downscale anything >20 MB to 720p before decode (faster, smaller) - synthesis: detect the prompt language (langdetect + diacritic fallback) and answer in it; natural prose + a final "Sources:" line; auto-sized length - precise re-transcription: loosen logprob gate -0.55 → -0.40 so it actually fires on weak audio; never crash (graceful fallback if the model can't load) - app.py: drop benign ClientDisconnect tracebacks from upload aborts Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>0695bec
-
Fix synthesis IndexError: guard against empty choices in HF stream events
Malina +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>165807e -
NINA v0.91 — 5-part retrieval + accuracy upgrade
Malina +1: Claude Sonnet 4.61. MaxSim retrieval (utils.py, retrieval.py) Store per-segment embeddings in each chunk (seg_embs). Bi-encoder scores via max cosine over segments instead of dot against the averaged embedding — a multi-topic chunk now surfaces if any single segment matches the query. 2. Adaptive chunking threshold (retrieval.py) Compute mean/std of consecutive segment similarities before the split loop. threshold = clip(mean − 0.5·std, 0.30, 0.62) — calibrates to each video's content dynamics rather than using the fixed 0.45 constant. 3. Segment-level cross-encoder scoring (retrieval.py) For chunks >120 words, score each segment individually against the query and take the max logit. Prevents silent truncation at the 512-token limit from hiding relevant content in the second half of long chunks. 4. Confidence-gated synthesis context (synthesis.py) Split regions into strong (conf ≥ 0.45) and context (below) before sending to the LLM. Context blocks are labelled separa…8aa6bb8 -
NINA v0.90 — anti-hallucination pass + DEBUG-gated output
Malina +1: Claude Sonnet 4.6- synthesis: replace static system message with language-aware _make_system_msg(); detect prompt language (Polish/German/French/Spanish/English) via Unicode heuristic and inject the explicit language name — prevents LLM from drifting to wrong language - synthesis: remove weaker in-message "write in the same language" rule (now in system) - synthesis: DEBUG-gate the "N region(s) found" header and "Sources:" footer; production output now shows only the 🧠 label + LLM answer - config: lower LLM_TEMPERATURE 0.1 → 0.05 for more deterministic output - pipeline: apply cached precise (large-v3-turbo) text to candidates before cross-encoder reranking — improves accuracy on repeat queries for same video Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>45db8e1
-
NINA v0.81 — modular refactor + usage-token gate + 8-vCPU queue
Malina +1: Claude Opus 4.7- Split monolith into app.py + pipeline/audio/auth/cache/config/models/retrieval/ synthesis/utils/visual modules. - auth.verify_usage_token: HMAC (NINA_SIGNING_SECRET) + expiry + single-use; pipeline.run() refuses without a valid Worker-issued token (per-account 10/5h limit enforced server-side; the public Space can't be used directly). - run() takes a 3rd `token` input; Interface queue tuned for ~8 vCPU (concurrency 3, max 40); uploaded-media purge kept (delete_cache 5 min). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>05f095d