ai-tube / src /lib /getChannelRating.ts
jbilcke-hf's picture
jbilcke-hf HF staff
added a view counter
f70dd7e
raw
history blame
390 Bytes
import { ChannelInfo } from "@/types"
const winners = new Set(`${process.env.WINNERS || ""}`.toLowerCase().split(",").map(x => x.trim()).filter(x => x))
// TODO: replace by a better algorithm
export function getChannelRating(channel: ChannelInfo) {
if (winners.has(channel.datasetUser.toLowerCase())) { return 0 }
// TODO check views statistics to determine clusters
return 5
}