is-it-nsfw_ai-moderator
14
license:apache-2.0
by
najicreator90856
Image Model
OTHER
New
14 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
📊 Evaluation Resultspythontransformers
from transformers import AutoImageProcessor, AutoModelForImageClassification
import torch
from PIL import Image
model_id = "najicreator90856/is-it-nsfw_ai-moderator"
processor = AutoImageProcessor.from_pretrained(model_id)
model = AutoModelForImageClassification.from_pretrained(model_id)
def predict(image_path):
image = Image.open(image_path).convert("RGB")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_label = logits.argmax(-1).item()
return model.config.id2label[predicted_label]
# print(predict("your_image.jpg"))Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.