Downloads · 30 days
31
16% of all-time downloads
acaciabengo/nsfw_text_detection
nsfw_text_detection is a text classification model from acaciabengo. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
This model is a fine-tuned DistilBERT-base-uncased model designed for binary classification of text content as either safe (0) or potentially Not Safe For Work (NSFW) (1). It leverages the power of transformer-based a…
Downloads · 30 days
31
16% of all-time downloads
All-time downloads
192
Public
Parameters
67M
402 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors268 MB · 67%
From the Hugging Face model README
This model is a fine-tuned DistilBERT-base-uncased model designed for binary classification of text content as either safe (0) or potentially Not Safe For Work (NSFW) (1). It leverages the power of transformer-based architectures for natural language understanding to identify patterns indicative of NSFW content.
The model is intended to assist in content moderation tasks, specifically for flagging text posts that may contain NSFW material. It can be used as a preliminary filter to reduce human reviewer workload or to enforce content policies on platforms.
The model was trained on a proprietary dataset.
This model is available via a high-availability, low-latency API for production use cases on RapidApi
from transformers import pipeline
repo = 'acaciabengo/nsfw_text_detection'
classifier = pipeline("text-classification", model=repo)
# Get all scores
all_scores = classifier("This is some text.", top_k=None)
nsfw_score = next(item['score'] for item in all_scores if item['label'] == 'LABEL_1')
print(f"NSFW Probability: {nsfw_score}")