How to use it?

#3
by Renyang - opened

Can I run it locally? Thank you!

You can run it using huggingface's pipeline:

from transformers import pipeline
from PIL import Image

pipe = pipeline("image-classification", model="giacomoarienti/nsfw-classifier")

image = Image.open("/path/to/file")
response = pipe(image)
print(response)

Thank you a lot!

Sign up or log in to comment