Spaces:
Running
Running
Commit History
-
Demo polish + scripted reel tour
§1-§7 section titles rewritten (Autocomplete for the DNA, Recognizing gene structure, Predicting mutation effects, Species specific generation, From DNA to proteins, Mapping out genomes, Reconstructing the tree of life) with matching lede rewrites; §3 status pill moves to the top-right of the DNA box and forest-bar viewBox tightens to rowH=46 so each row fits a single reel frame; social banner reflects the 393,216 bp context. app.py adds a DEV=1 mode that re-reads templates per request (so edits to demo.html / social-banner.html show up without restarting uvicorn) and exposes /reel for the scripted tour. social_reel.html drives the tour: banner stage now adopts the iframe size (no letterbox, no crop), ken-burns zoom is gone, scene-to-scene transitions are a vertical slide on .stage-frame, and the logo / thumb contact sheets are hidden in the embedded banner so only the hero shows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>7ae5802 -
Demo polish: SEO/AI-agent discoverability + new hexagonal logo + §1 helix per-letter fade + sandbox empty-state
- Discoverability surface: robots.txt, sitemap.xml, llms.txt, JSON-LD/OG/Twitter metadata in demo.html; app.py templates demo + social-banner with {{SITE_URL}} resolved per-request from X-Forwarded-*; Dockerfile COPYs the new files. - New hexagonal Carbon mark (img/logo.svg) plus black square/rectangle lockups used by the social-banner contact sheet. - social-banner: noindex, doubles as a brand contact sheet under the stage with native-size square and rectangle lockups for one-shot screenshots. - §1 intro helix: per-letter depth-aware fade — front-strand letter at each crossing stays readable while its back-strand sibling recedes, instead of both going equally ghosted. - Sandbox empty-state: centered, white-on-white, lighter contrast so the placeholder reads as a hint rather than a block. - New §X efficiency section script wired into demo.html. Co-authored-by: Cursor <cursoragent@cursor.com>1d5de93 -
Demo polish: header specs, primer rewrite, hide endpoint URL, tab rename
- Banner: 393,216 bp context (was 49,152); footer model badge removed - Intro tab: rewrite primer §0/§1/§3/§4 paragraphs; clarify 1T tokens (6T bp) - DNA Lab intro: use "Carbon-3B" to differentiate from upcoming releases - Hide endpoint URL in frontend (sandbox header + code snippets); /config no longer returns it; backend still uses real ENDPOINT_URL via env/default - Code snippets: rename tabs to "API" / "transformers", generic https://<your-endpoint>/v1/ placeholder, escape angle brackets - Sandbox: fold "Connected to {model}" into the Input card header - Rename tabs demo->dna-lab and model->recipe (URLs now #dna-lab, #recipe)3cf1b0c -
§6 UMAP: highlight curated gene sets (HOX, mitochondrial) + per-mode descriptions
Adds a second toolbar row of "highlight" pills next to the existing colour-by controls. Each pill recolors the WebGL scatter via a 2-class palette (dimmed grey ghost + vivid foreground), so the highlight is a view of the existing points, not new geometry on top. Identity matching is coord-snap via the spatial grid already built for hover, since the bin is species-bucketed and the CSV's row_idx doesn't line up with the bin's row order. Adds a per-mode descriptive paragraph above the chart explaining what each axis or gene set actually is (biotypes, GC content, HOX, mt-DNA), and moves the navigation hint to a right-aligned slot in the stat row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>468dae5
-
Intro tab + central-dogma primer + em-dash sweep
- New Intro tab as default landing: release blurb, tab-nav guide (bullet list with banner-style links), and an optional "quick primer in genetics" §1-§5 walkthrough using the existing section--two-col + .demo primitives. - Primer visuals: skeletal-formula SVGs for the four bases, static DNA helix (~10 bp/turn), gene strip (promoter / exons / introns), splice diagram with transcribe arrows, 10-column codon to amino-acid table with peptide-bond chain, and a live 3Dmol.js viewer of human hemoglobin (PDB 1A3N) bundled in assets/data/ for fast first paint. - Lazy-init the 3D viewer via MutationObserver on the panel's .active class, so visitors who deep-link to #demo / #sandbox skip the fetch. - Tabs renamed: Demo to DNA Lab, Model to Carbon Recipe (display labels only; data-tab slugs and URL hashes stay 'demo' / 'model' for backwards-compat). - Banner: add Code placeholder link to banner-links; tab buttons use min-width + nowrap so "Carbon Recipe" stays on one line. - …5ea40ce -
Sandbox card layout, sticky-nav breadcrumb, drop §2/§3 score buttons
- Sandbox: refactor into stacked cards (sb-card with eyebrow/title/hint headers, Input → Output) plus a Connected-to strip up top, replacing the flat wall of controls. - Sticky nav: add a CARBON / huggingfacebio-carbon-3b breadcrumb on the left of the sticky strip so the "you're on the Carbon page" cue stays visible after the hero scrolls out. - §2 (VEP) and §3 (Track): drop the manual ▶ score / score all buttons. §3 tracks are precomputed (logprobs ship in data/genes.json), so the toolbar is just a gene selector now; §2 will auto-score on select. - Misc: app.py, precompute.py, controls.css, layout.css, section-tree.css, banner.js and data/genes.json picked up along the way. - Add social-banner.html. Co-authored-by: Cursor <cursoragent@cursor.com>b64beb5 -
Hero refresh + sticky tab nav + section polish
Banner / hero - Desaturate the DNA helix palette (banner.js TINT) so the canvas blends into the paper rather than punching through it. - Cursor caret trimmed from the top so it stops poking above the N's cap height while keeping its baseline aligned with the wordmark. Sticky tab nav - New strip (#tab-nav-sticky) slides in from the top once the in-banner #tab-nav scrolls out of view (IntersectionObserver in tabs.js toggling .is-tabs-stuck on <body>). - Styled as a slice of the banner: same paper backing, dotted grain + green vertical stripes, same bottom hairline. Tabs reuse the in-banner colour scheme with bumped #b8b5a6 borders, sharp corners, top liseré on the active tab, and a margin-bottom: -1px trick so the active card bleeds into the page paper underneath. - Promoted --paper / --ink / --green / --hairline / --muted to :root so the sticky nav (a sibling of .carbon-banner, not a descendant) can resolve them. Section layout - §1 tokenizer: 1-mer and 6-mer colum…1cc98cf
-
Split demo.html into modular CSS/JS assets
demo.html had grown to 6477 lines with a single inline <style> (1240 lines) and a single inline <script> (4358 lines) — every change meant hunting through one giant scrollback and risked breaking unrelated sections. Extracted into /assets/: styles/ 14 files, ~1280 lines: base, header, banner, layout (incl. new section--two-col), controls, sequence, section-{folding,umap,tree,vep,species}, recipe, sandbox, footer js/shared/ helpers.js (lerp, logprobRgb, renderSeq…) + config.js (fetchConfig, loadConfig, loadGenes) js/sections/ one IIFE per demo card: completion, vep, track, species, folding, tokenizer, loss, data, architecture, sandbox, umap, tree js/ banner.js (DNA helix Canvas 2D), tabs.js (hash routing + bootstrap loadConfig) Strategy: plain <script> tags, not ES modules. Each IIFE was extracted verbatim and globals stay global — minimum behavioural risk. Migrating …39a61da -
Add §7 species tree, slim down §6 UMAP, mount /experiments
§7 · Species tree (Carbon-derived phylogeny) - scripts/build_species_tree.py derives a 27-species tree from Carbon-3B mean embeddings: per-species centroid distance matrix + Ward/UPGMA linkage + precomputed dendrogram layout. Output ships as data/species_tree.json (32 KB), served by new /species_tree endpoint. - demo.html gains a §7 section rendering the dendrogram as an SVG spine on the left and aligned rows on the right, with linkage + scope toggles and an "agreement vs NCBI" headline score. - scripts/render_tree_{mockups,mockups_v2,d_plus}.py: offline PNG mockups used during the §7 design review. §6 · UMAP refinements - Drop pos_3d from data/umap.bin. v1 only renders the 2D scatter and the frontend already skipped pos_3d on parse, so the int16×3 coords were 3.3 MB of dead bandwidth per visit. New WRITE_POS_3D toggle in build_real_umap.py for an easy re-enable. Wire payload 6.24 → 3.09 MB gzipped (~−50%). - New /umap_names endpoint serving the lazy-loaded per-poi…1f90847
-
Tune gene-continuation defaults: gen=60 bp, temp=0.5, top_p=0.9
Default 300-bp rollout was past the model's reliable horizon — identity collapsed to ~25% via autoregressive drift / repetition traps. Shorter window keeps demo within the regime where the model is competent (MYC: 27% → 61%; mean logprob: -7.9 → -2.5). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>7838845
-
Update app.py
Verified signature2831701
-
Merge feature/umap-scatter into feat/folding-3d (local-only)
Combines the §6 UMAP scatter and §5 Folding work into one branch for end-to-end local testing. To be split back into two separate PRs. demo.html conflict resolution: kept §6 UMAP IIFE from umap-scatter, kept the Canvas 2D banner comment from folding-3d (perf branch already merged into main). No code changes, just a comment block. Co-authored-by: Cursor <cursoragent@cursor.com>45f472e
-
Add /fold endpoint proxying NVIDIA NIM ESMFold
Frontend §5 (the "From sequence to structure" section) needs predicted 3D structures to render. We proxy through the backend so the NIM API key stays on the server. Body: {"sequence": "<AA>"} Returns: {"pdb": str, "n_residues": int, "plddt_mean": float, "cached": bool} or {"error": str} on failure. Implementation notes: - httpx (already pulled in transitively by openai) replaces urllib so SSL works out of the box on macOS without certifi gymnastics. Declared explicitly in requirements.txt. - Sequence is filtered to the 20 standard AAs before submission — NIM rejects anything outside that charset (incl. stop codons "*"), and callers shouldn't need to know the exact regex. - Truncated to 1024 aa (NIM's hard cap). - pLDDT mean is extracted from the B-factor column on CA atoms so the frontend can show a global confidence score without re-parsing the PDB. - sha1(sequence) → result FIFO cache (max 256 entries) since ESMFold is deterministic. Demo viewers re-folding the same gen…543de2f -
§6: WebGL UMAP scatter, 500K points on a fake fixture
Replaces the "coming soon" stub for §6 with an interactive scatter that loads 500K points and lets you toggle the coloring axis (species, biotype, strand, codon phase) on the same vertex stream. Frontend (demo.html, ~290 LOC): - Vanilla WebGL (no library) — gl.POINTS + 1D palette texture, fragment shader does smoothstep AA on gl_PointCoord so dots stay clean at any zoom. Pan/zoom-around-cursor + hover picking via a 128² spatial grid. - Toggle coloring rebinds the category attribute on a different uint8 buffer and swaps the palette texture — no re-upload of the 500K vertices. Switch is instant on GPU. - Render-on-demand (no rAF loop); IntersectionObserver defers the /umap fetch until the section approaches the viewport so first paint isn't taxed. Backend (app.py): - GZipMiddleware (minimum_size=1024, compresslevel=6) — gzip(1)'s default level: ~3% worse ratio than 9, ~5x cheaper CPU. Cuts /umap from 4 MB to ~2.1 MB on the wire. - GET /umap → b…f039f0b
-
Add tabbed Demo / Model / Sandbox page (default = Sandbox)
New /demo route serves a single-page app with three tabs: - Demo: 4 interactive sections (gene completion, VEP, likelihood track, cross-species) plus folding/UMAP placeholders - Model: tokenizer, training objective (CE→FNS), data, architecture - Sandbox: the existing DNA continuation playground (default tab) Server-side: new /score endpoint (echo-logprobs), /genes /variants /species data routes, /img static mount, and left-padding for prompts that aren't a multiple of 6 bases (avoids phantom-A artifacts at the prompt boundary). Includes data fetchers (Ensembl REST) for genes / variants / species and a precompute script that bakes per-token logprobs and ref-vs-alt window scores into the JSON files so the page renders instantly without round-tripping the inference endpoint on first paint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>971b586
-
Initial demo: streaming DNA continuation with logprob coloring
Verified signature85cdfe7