Thomas G. Lopes
add fuzzy searching
0ff4ef8
raw
history blame
214 Bytes
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);
}