File size: 379 Bytes
812d95a
 
 
73a8db9
9b4caaa
 
2087f3e
73a8db9
 
 
1
2
3
4
5
6
7
8
9
10
11
import { page } from "$app/state";
import type { ModelWithTokenizer } from "$lib/types.js";

class Models {
	all = $derived(page.data.models as ModelWithTokenizer[]);
	trending = $derived(this.all.toSorted((a, b) => b.trendingScore - a.trendingScore).slice(0, 5));
	nonTrending = $derived(this.all.filter(m => !this.trending.includes(m)));
}

export const models = new Models();