Downloads · 30 days
11
1% of all-time downloads
KhoiBui/tiktok-text-safety-classifier
tiktok-text-safety-classifier is a text classification model from KhoiBui. Use it when you need a label for a piece of text. The card lists the license as mit.
This model classifies TikTok video text content (captions, comments) as safe or harmful.
Downloads · 30 days
11
1% of all-time downloads
All-time downloads
1.2K
Public
Parameters
560M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
From the Hugging Face model README
This model classifies TikTok video text content (captions, comments) as safe or harmful.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("KhoiBui/tiktok-text-safety-classifier")
model = AutoModelForSequenceClassification.from_pretrained("KhoiBui/tiktok-text-safety-classifier")
text = "your text here"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
prediction = outputs.logits.argmax(-1).item() # 0=safe, 1=harmful