Downloads · 30 days
26
60% of all-time downloads
amba370447/vn-comment-filter-kids
vn-comment-filter-kids is a text classification model from amba370447. Use it when you need a label for a piece of text. The card lists the license as mit.
Model lọc bình luận tiếng Việt được thiết kế đặc biệt cho nền tảng đọc báo dành cho trẻ em.
Downloads · 30 days
26
60% of all-time downloads
All-time downloads
43
Public
Parameters
136M
546 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors544 MB · 99%
From the Hugging Face model README
Model lọc bình luận tiếng Việt được thiết kế đặc biệt cho nền tảng đọc báo dành cho trẻ em.
Model này được phát triển để:
Phát hiện nhanh các từ ngữ tục tĩu, dâm ô bằng rule-based matching.
Phân loại CLEAN vs TOXIC bằng deep learning model.
# Chạy FastAPI server
python api_server.py
# Test bằng curl
curl -X POST "http://localhost:8000/filter" \
-H "Content-Type: application/json" \
-d '{"text": "Sản phẩm tốt", "strict_mode": true}'
from transformers import AutoTokenizer, AutoModel
import torch
# Load model
model = AutoModel.from_pretrained("your-username/vn-comment-filter-kids")
tokenizer = AutoTokenizer.from_pretrained("your-username/vn-comment-filter-kids")
# Inference
text = "Comment cần kiểm tra"
inputs = tokenizer(text, return_tensors="pt", max_length=256, padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=-1).item()
print("CLEAN" if prediction == 0 else "TOXIC")
Model hỗ trợ 2 modes:
.
├── model.safetensors # Model weights
├── config.json # Model config
├── tokenizer files # Tokenizer artifacts
├── preprocessing_config.json # Text preprocessing rules
├── specialist_navigator.pkl # Logistic model cho OFF vs HATE
├── specialist_power.pkl # Logistic model cho toxicity prob
├── requirements.txt # Python dependencies
└── README.md # Documentation này
MIT License - Free for educational and commercial use
For questions or issues, please open an issue on the repository.