YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
Example Usage
Here's a step-by-step Python code example to classify an image:
from transformers import pipeline
import requests
from PIL import Image
from io import BytesIO
# 1. Load the pipeline for image classification
pipe = pipeline("image-classification", model="zguo0525/myshell_nsfw_filter")
# 2. Load the image into memory (assuming you have the URL for the image)
image_url = 'https://img-myshell.net/meinamix/red_hair_girl'
response = requests.get(image_url)
image = Image.open(BytesIO(response.content))
# 3. Use the pipeline to classify the image
results = pipe(image)
# 4. Print the results
label = results[0]['label']
score = results[0]['score']
print(f"{label}: {score:.4f}")
- Downloads last month
- 8
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.