Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 447 Bytes
7357f85 1778c9e 5acf3a4 1979653 5acf3a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import type { PageLoad } from "./$types.js";
import type { ApiModelsResponse } from "./api/models/+server.js";
export const load: PageLoad = async ({ fetch }) => {
const [modelsRes, routerRes] = await Promise.all([
fetch("/api/models"),
fetch("https://router.huggingface.co/v1/models"),
]);
const models: ApiModelsResponse = await modelsRes.json();
const routerData = await routerRes.json();
return {
...models,
routerData,
};
};
|