Spaces:
Running
Running
Commit History
-
Embed every evidence table, read the winners' shot-by-shot analysis, and use the imported hook clips' tags
2071 rows across videos, hooks_video, hooks_text, leads, frameworks and broll had no embedding, so vector retrieval returned nothing for them and the pool fell back to the newest 150 rows by insertion order. The backfill script never listed videos, hooks_video or leads, still named the renamed `hooks` table, and read one 1000-row page of a 1700-row table. Fixed and run. videos.ffanalysis (170 of 173 winners: beat-by-beat dialog and visuals, concept, what's working, audience strategy) was never read; it now goes into both the embedding and the evidence the agents see. hooks_video's import columns (category, use_case, emotion, orientation, duration) likewise; vertical clips rank ahead of landscape ones for 9:16 ads. Migration 0012 records the columns added and dropped in the dashboard since the baseline, and the research prompt stops asking for the two niches columns that no longer exist. CLAUDE.md added for future sessions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>d38fa83
-
Cast real people with their own voices, sell the product you attached, and take five-minute ads
Avatar library: 250 presenters imported from reference creators, each with a MiniMax voice cloned from their own sample (scripts/clone_voices.py), so the classic, green-screen and split modes speak in the avatar's voice instead of a stock one. Library frames are cropped to 9:16 on load and voice samples trimmed to what Seedance accepts, and the stitch now scales and crops every clip to the exact frame, which is what let the first avatar render through. Product briefs: an Ecom niche whose ads are always for one product (the API refuses one without), product pages read into facts and photos, and a brief that carries a product is researched from the product rather than the niche. The form no longer carries a prefilled brief from one niche into another. Limits: reference ads and generated ads up to five minutes. Long videos go to Gemini through its file store and are deleted the moment the read is done. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>7dfe8d4
-
Stop paying twice, measure every run, and make the picture, voice and props hold up
Spend and reliability: identical paid requests reuse the running job, every paid button shows a price and asks first, uploads no longer block the server, job status comes from the database, and the synchronous video endpoint is gone. Measurement: every model call logs tokens and cost, generations and renders carry a cost, and an eval runner replays saved briefs without touching the DB. Platform: vector search over the whole library (pgvector HNSW), one image that runs as api, worker or both, persistent Redis, TLS for external Redis, and a production guard that refuses local media. Scripts and judging: a hard spoken-word budget, no fragment sentences in continuous mode, a fixed Gemini judge on every run, ad-policy checks, and hooks drawn from the brain or the research with no opener steering. Video: a render critic that reviews every clip and re-renders the bad ones, takes planned to land within 10% of target, portraits checked before any paid animation (no more grid presenters), th…13354e2
-
Ground generation in the real schema, and tune pace against reference ads
Two reference ads were torn down shot by shot and measured. Ours ran 4.4s average shots with 15% dead air; they ran 2.6-3.7s with 0-11%. Everything here follows from closing that gap and from writing the database schema down next to the code that reads it. Pace and dead air - Only the last VOICED clip holds a beat now. SPEECH_TAIL_SECONDS was paid on every clip, which put ~0.7s of silence on each cut: 7.4s of a 48s ad. - presenter_max_seconds (6s), separate from the model's 15s per-clip ceiling. The two were the same value, which is exactly why the longest shot measured 15.0s — the model's limit standing in for an editor's. - split_overlong_scenes cuts a long monologue into several shots. Moving surplus words to a neighbour cannot converge: the last scene has no forward neighbour, so it pushes them back and the pass ping-pongs. Latent at a 15s cap, guaranteed at 6s. Replay of the shipped ad: 11 shots -> 14, avg 4.27s -> 3.36s, longest 15.0s -> 5.1s. The hook decides its…6272eef
-
Move every hosted model to fal.ai, and cast the narrator to the presenter
Replaces Replicate entirely, upgrades Seedance 2.0 -> 2.5 at 480p, and swaps Gemini TTS for ElevenLabs v3. Also lands the brain tables, the concept picker, and the QA/version work — they share too many files to separate without leaving intermediate commits that don't run. Provider migration - app/services/fal.py is the single door: upload (fal takes URLs, not file handles), run (subscribe owns the queue, so the create/poll/reload loops are gone) and guard, which preserves the failure taxonomy that matters — a moderation refusal must stay distinguishable from a 503 or we either burn retries on a request that can never succeed, or lose a render to a blip. SeedanceError is renamed ProviderError now that it covers speech. - Seedance 2.5 splits into per-mode endpoints and text-to-video accepts NO reference input, so the endpoint is chosen by whether a reference was passed. Live testing caught a 422 on top of that: 2.5 rejects an explicit aspect_ratio on a video extension, s…07f3ede
-
Add background-job tracking; rebuild editor placement, split and trim
Editor - Text (captions and titles) is now placed by dragging it on the frame. `x`/`y` are frame fractions addressing the box's centre, clamped so a box dragged to an edge stays fully on screen. The `position` presets still apply when they're absent, so the render pipeline's own captions and older payloads are unaffected. Placement is computed in Python rather than as an ffmpeg `overlay=x=...` expression: those need commas, and comma escaping inside a filtergraph differs between ffmpeg builds. - Split at the playhead. Both halves keep the same manifest index, so the export trims one source file twice and nothing is regenerated. The spoken line is divided with the cut (EditClip.spoken) or both halves would be captioned with the whole sentence; titles anchored past the cut re-anchor to the second half. - Trim by dragging a clip's edges, with the playhead parked on the exact frame being dragged to. Undo/redo over clips, titles and caption edits, with a drag coalescin…9d66133
-
Resolve the edit-key niche from the DB so the editor finds clips on R2
R2 edit keys embed the niche (edits/<niche>/<render_id>/clip_NN.mp4) but every editor call site only holds a render id, so load_manifest/replace_clip derived a different key than save_clips wrote and found nothing. media.niche_for() looks the niche up once per render and the key builders fall back to it, fixing all six call sites at the choke point. Misses aren't cached, since the edited-render path saves clips before inserting its row. Also adds R2_ENDPOINT_URL (give the endpoint directly instead of an account id), scripts/check_r2.py to verify credentials plus the custom domain, and scripts/migrate_media_to_r2.py to lift generated_videos/ into R2 and repoint renders.file_name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>5812e2e
-
Deploy Creative Brain to Hugging Face Spaces (Docker)
Single-container Dockerfile (frontend build + ffmpeg + redis + celery + API on 7860), FastAPI serves the SPA, README front-matter, safe .gitignore. Runtime media (generated_videos/) is excluded — the app regenerates it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>b327bf6