Skip to content

Commit fc2ccde

Browse files
committed
fix: demo resolves the index through the CORS asset proxy (13)
1 parent c051bfc commit fc2ccde

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pages/neural.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ import Base from "../layouts/Base.astro"
8989
<script>
9090
import { imf } from "interscript/ml"
9191

92+
const ASSET_INDEX = "https://api.interscript.org/v1/assets/index-v2/models-index.yaml"
93+
9294
const $ = (id: string) => document.getElementById(id)!
9395
let current: { dispose?(): Promise<void> } | null = null
9496

@@ -98,7 +100,7 @@ import Base from "../layouts/Base.astro"
98100
const label = $("progress-label")
99101
progress.hidden = false
100102
label.textContent = "Resolving verified index…"
101-
const resolved = await imf.resolve(modelId, undefined, {
103+
const resolved = await imf.resolve(modelId, ASSET_INDEX, {
102104
onProgress: (fraction, bytes) => {
103105
bar.style.width = `${Math.round(fraction * 100)}%`
104106
label.textContent = `${(bytes / 1e6).toFixed(0)} MB (${Math.round(fraction * 100)}%)`

0 commit comments

Comments
 (0)