Text Classification
Transformers
Safetensors
PyTorch
English
toxicity
profanity
content-moderation
hate-speech
multi-label-classification
Instructions to use Qarvexium/NoInsult with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qarvexium/NoInsult with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Qarvexium/NoInsult")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Qarvexium/NoInsult", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Quick Start
Run inference:
from NoInsult import predict
result = predict("I will fuck you up, you piece of shit.")
print(result["flags"]) # Boolean predictions
print(result["scores"]) # Confidence scores
Example output:
Loading NoInsult by Qarvexium
Loading weights: 100%|ββββββββββββββββββββ| 201/201 [00:00<00:00, 330.76it/s]
Labels:
['toxicity', 'severe_toxicity', 'obscene', 'threat', 'insult', 'identity_attack', 'sexual_explicit']
Thresholds:
[0.909860372543335, 0.5, 0.983537495136261, 0.9544731974601746,
0.9325506091117859, 0.9784075617790222, 0.9820615649223328]
Flags:
{
"toxicity": true,
"severe_toxicity": true,
"obscene": false,
"threat": false,
"insult": false,
"identity_attack": false,
"sexual_explicit": false
}
Scores:
{
"toxicity": 0.9529,
"severe_toxicity": 0.8466,
"obscene": 0.9799,
"threat": 0.7640,
"insult": 0.9251,
"identity_attack": 0.4795,
"sexual_explicit": 0.9042
}
Output Format
predict() returns a dictionary with two fields:
flagsβ Boolean predictions after applying class-specific thresholds.scoresβ Raw sigmoid probabilities for each category.
Supported labels:
toxicitysevere_toxicityobscenethreatinsultidentity_attacksexual_explicit