File size: 214 Bytes
0ff4ef8
39318e7
 
 
 
1
2
3
4
5
6
import type { ModelWithTokenizer } from "$lib/types";

export function getTrending(models: ModelWithTokenizer[], limit = 5) {
	return models.toSorted((a, b) => b.trendingScore - a.trendingScore).slice(0, limit);
}