File size: 227 Bytes
590e30d
 
 
 
 
 
d533730
 
 
1
2
3
4
5
6
7
8
9
10
from functools import lru_cache
from transformers import pipeline


@lru_cache(maxsize=1)
def get_classifier():
    return pipeline(
        "text-classification", "mothy-08/deberta-v3-xsmall-finetuned-content-moderator"
    )