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
-
Limit wideo 200 -> 500 MBβ
Zgodnie z frontem na app.nnlabs.pl, ktory odrzuca wieksze pliki przed wyslaniem. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>9c49140 -
Follow-up z kontekstu szybkim modelem, z limitem na sprawdzenia i z logamiβ
2026-09-19 jeden follow-up ("Make me a quiz from this video") trwal 3 min 48 s. Nic sie nie wysypalo, odpowiedz doszla i zapisala sie w bazie, ale dla uzytkownika wygladalo to jak awaria: najpierw pol minuty samych kropek, potem tekst sacznacy sie przez prawie cztery minuty. Follow-up robi trzy wywolania modelu po kolei: route (czy ogladac jeszcze raz), on_topic (czy pytanie dotyczy filmu) i sama odpowiedz. Wszystkie trzy szly modelem tekstowym Qwen2.5-72B. Samo route, trzy tokeny, uderzylo w 30-sekundowy limit Workera. W tym samym Space, kilka minut wczesniej, Qwen3-VL-30B-A3B napisal pierwsza odpowiedz w 8 s. Zmierzony wprost generuje okolo 4,5 raza szybciej (~450 wobec ~100 znakow/s) i to on pisze kazda analize, wiec glos NINY sie nie zmienia. - CHAT_MODEL = VLM_MODEL dla wszystkich trzech wywolan czatu - oba jednowyrazowe sprawdzenia przez osobnego klienta z limitem 10 s (CHAT_CHECK_TIMEOUT); maja bezpieczne domyslne (answer / on-topic), wiec wolny dostawca nie moze juz trzymβ¦077fd06
-
Upgrade VLM to Qwen3-VL-30B-A3B-Instructβ
Malina +1: Claude Opus 4.8The 8B answer engine occasionally slipped on grammar/basic facts. Move to the 30B-A3B model (same Qwen3-VL family, live on novita/featherless) for sharper output at a modest cost/latency bump. Text fallback (72B) unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>162bca3 -
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 3b: OCR burned-in captions (RapidOCR) as the last fallback rungβ
Malina +1: Claude Opus 4.8Final rung of the transcript ladder: when the audio stays unreliable, there's no embedded subtitle track, AND CLIP detects on-screen text, OCR the bottom strip of sampled frames and collapse repeated cues into timed segments. - ocr.py: RapidOCR (onnxruntime) over ffmpeg-sampled frames, best-effort. - visual.has_on_screen_text(): CLIP gate so OCR stays off for most videos. - pipeline: post-ingest OCR fallback, rebuilds chunks + re-attaches speakers. - deps: rapidocr-onnxruntime; packages.txt adds libgl1/libglib2.0-0 for OpenCV. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>729fbc4 -
NINA Phase 3a: embedded subtitle fallback (no new deps)β
Malina +1: Claude Opus 4.8When the ASR transcript is unreliable, prefer a clean human subtitle track if the upload carries one (text-based codecs extracted via ffmpeg) before falling back to vocal isolation. subtitles.py parses SRT/ASS/mov_text/WebVTT into segments. Bitmap subs / burned-in captions (OCR) are out of scope here β separate heavier step. Best-effort: any failure leaves the ASR transcript in place. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>f1e4c89 -
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
-
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