Spaces:
Running on Zero
Running on Zero
Download connect.html from SharpMeow/scroll-lens: direct link, hf CLI and curl.
- Browser
- Download file 11.8 kB
-
https://huggingface.co/spaces/SharpMeow/scroll-lens/resolve/main/connect.html
- Command line
-
hf download hf://spaces/SharpMeow/scroll-lens/connect.html
-
curl -L -o connect.html https://huggingface.co/spaces/SharpMeow/scroll-lens/resolve/main/connect.html
11.8 kB
| <section class="scc" id="connect" aria-label="Connect your tool"><style>.scc{--a:var(--scc-accent,#4ea8de);color:inherit;font:inherit;line-height:1.5;max-width:60rem} | |
| .scc h2{font-size:1.15em;margin:.2em 0 .3em}.scc h3{font-size:1em;margin:0 0 .2em} | |
| .scc p{margin:.3em 0}.scc a{color:var(--a)} | |
| .scc .scc-src{border:1px solid color-mix(in srgb,currentColor 18%,transparent);border-radius:10px;padding:.7em .9em;margin:.7em 0;background:color-mix(in srgb,currentColor 4%,transparent)} | |
| .scc .scc-meta{font-size:.85em;opacity:.8} | |
| .scc details{border-top:1px solid color-mix(in srgb,currentColor 12%,transparent);padding:.35em 0} | |
| .scc summary{cursor:pointer;font-weight:600;list-style-position:inside} | |
| .scc .scc-b{font-weight:400;font-size:.75em;padding:.05em .5em;border-radius:99px;margin-left:.5em;border:1px solid currentColor;opacity:.75;white-space:nowrap} | |
| .scc .scc-b.ok{color:#3fb37f}.scc .scc-b.src{color:var(--a)}.scc .scc-b.warn{color:#e0a030} | |
| .scc .scc-code{position:relative;margin:.4em 0 .2em} | |
| .scc pre{margin:0;padding:.7em .8em;border-radius:8px;overflow:auto;font-size:.82em;background:color-mix(in srgb,currentColor 9%,transparent);white-space:pre} | |
| .scc code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace} | |
| .scc button.scc-copy{all:unset;box-sizing:border-box;position:absolute;top:.35em;right:.35em;font-size:.75em;line-height:1.4;padding:.1em .6em;border-radius:6px;border:1px solid color-mix(in srgb,currentColor 30%,transparent);background:color-mix(in srgb,currentColor 8%,transparent);color:inherit;cursor:pointer} | |
| .scc button.scc-copy:hover{border-color:var(--a)} | |
| .scc .scc-url{position:relative}.scc .scc-url pre{padding-right:4.5em;white-space:pre-wrap;word-break:break-all} | |
| .scc .scc-go{display:inline-block;margin:.3em 0;padding:.25em .8em;border-radius:6px;border:1px solid var(--a);text-decoration:none} | |
| .scc footer{font-size:.8em;opacity:.75;margin-top:.6em}</style> | |
| <h2>Connect your tool</h2> | |
| <p>The twelve scans Scroll Lens reads are open data, and each one reads straight from its URL in your own tool. The page itself is also an API and an MCP server.</p> | |
| <div class="scc-src" id="connect-ct"><h3>A scan it reads, example PHerc0139 2.399 um</h3> | |
| <p class="scc-meta">CC BY-NC 4.0 (Vesuvius Challenge open data) 路 The other eleven are listed by list_scans; all are read live, never copied here. Scroll Lens reads level 0. 路 <a href="https://scrollprize.org/data_browser/PHerc0139" target="_blank" rel="noopener">browse</a></p> | |
| <div class="scc-url"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr</code></pre></div> | |
| <details><summary>Python (zarr)<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install "zarr>=3" fsspec aiohttp | |
| import zarr | |
| root = zarr.open_group("https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr", mode="r") # OME-Zarr, zarr v2 | |
| a = root["3"] # level 0 is full resolution; level L is 2**L times coarser | |
| print(a.shape, a.dtype, a.chunks) | |
| block = a[4810:4874, 1657:1721, 1657:1721] # (z, y, x); reads only the chunks it touches</code></pre></div></details> | |
| <details><summary>villa's vesuvius package<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install "vesuvius[volume-only]" | |
| from vesuvius import Volume | |
| v = Volume(type="zarr", path="https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/3") # one pyramid level | |
| block = v[4810:4874, 1657:1721, 1657:1721]</code></pre></div></details> | |
| <details><summary>VC3D<span class="scc-b src">from villa's source</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>In VC3D (villa's volume-cartographer), open or create a project, then | |
| File > Attach Remote Zarr... and paste: | |
| https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr | |
| It accepts http, https and s3 OME-Zarr roots.</code></pre></div></details> | |
| <details><summary>neuroglancer<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <a class="scc-go" href="https://neuroglancer-demo.appspot.com/#!%7B%22layers%22%3A%5B%7B%22type%22%3A%22image%22%2C%22source%22%3A%22zarr%3A%2F%2Fhttps%3A%2F%2Fvesuvius-challenge-open-data.s3.us-east-1.amazonaws.com%2FPHerc0139%2Fvolumes%2F20260102150214-2.399um-0.2m-78keV-masked.zarr%2F%22%2C%22name%22%3A%22A%20scan%20it%20reads%2C%20example%20PHerc0139%202.399%20um%22%7D%5D%2C%22layout%22%3A%224panel%22%7D" target="_blank" rel="noopener">Open in neuroglancer</a> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://neuroglancer-demo.appspot.com/#!%7B%22layers%22%3A%5B%7B%22type%22%3A%22image%22%2C%22source%22%3A%22zarr%3A%2F%2Fhttps%3A%2F%2Fvesuvius-challenge-open-data.s3.us-east-1.amazonaws.com%2FPHerc0139%2Fvolumes%2F20260102150214-2.399um-0.2m-78keV-masked.zarr%2F%22%2C%22name%22%3A%22A%20scan%20it%20reads%2C%20example%20PHerc0139%202.399%20um%22%7D%5D%2C%22layout%22%3A%224panel%22%7D</code></pre></div></details> | |
| <details><summary>curl<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>curl -s https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/.zattrs # OME multiscales metadata | |
| curl -s https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/3/.zarray # one level: shape, chunks, dtype, codec</code></pre></div></details> | |
| </div> | |
| <div class="scc-src" id="connect-api"><h3>Call Scroll Lens from code or an agent</h3> | |
| <p class="scc-meta">Code Apache 2.0; models as listed by list_scans; scans CC BY-NC 4.0 路 A new point uses the caller's ZeroGPU minutes. Model output, not a reading.</p> | |
| <div class="scc-url"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://huggingface.co/spaces/SharpMeow/scroll-lens</code></pre></div> | |
| <details><summary>Python /list_gallery<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install gradio_client | |
| from gradio_client import Client | |
| client = Client("SharpMeow/scroll-lens") | |
| result = client.predict(api_name="/list_gallery")</code></pre></div></details> | |
| <details><summary>Python /list_scans<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install gradio_client | |
| from gradio_client import Client | |
| client = Client("SharpMeow/scroll-lens") | |
| result = client.predict(api_name="/list_scans")</code></pre></div></details> | |
| <details><summary>Python /random_point<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install gradio_client | |
| from gradio_client import Client | |
| client = Client("SharpMeow/scroll-lens") | |
| result = client.predict(scan="PHerc0139", seed=0, api_name="/random_point")</code></pre></div></details> | |
| <details><summary>curl /list_gallery<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>URL=https://sharpmeow-scroll-lens.hf.space | |
| EVENT=$(curl -s -X POST $URL/gradio_api/call/list_gallery -H 'Content-Type: application/json' \ | |
| -d '{"data": []}' | python3 -c 'import json,sys; print(json.load(sys.stdin)["event_id"])') | |
| curl -sN $URL/gradio_api/call/list_gallery/$EVENT</code></pre></div></details> | |
| <details><summary>MCP (Claude, Cursor and other agents)<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>{ | |
| "mcpServers": { | |
| "scroll-lens": { | |
| "url": "https://sharpmeow-scroll-lens.hf.space/gradio_api/mcp/sse" | |
| } | |
| } | |
| } | |
| Tool list: https://sharpmeow-scroll-lens.hf.space/gradio_api/mcp/schema</code></pre></div></details> | |
| </div> | |
| <footer>Machine-readable: <a href="https://huggingface.co/spaces/SharpMeow/scroll-lens/blob/main/connect.json" target="_blank" rel="noopener">connect.json</a> and <a href="https://huggingface.co/spaces/SharpMeow/scroll-lens/blob/main/CONNECT.md" target="_blank" rel="noopener">CONNECT.md</a>. Checked 2026-10-24. "Tested" means the snippet ran against this public data on that date. Scan data keeps its own license (the Vesuvius Challenge open data is CC BY-NC 4.0).</footer></section> | |