from transformers import pipeline | |
from PIL import Image | |
img = Image.open("C:/Users/yefta/Pictures/Anime Girl/WhatsApp Image 2023-10-07 at 01.36.25_8935adbb.jpg") | |
predict = pipeline("image-classification", model="AdamCodd/vit-base-nsfw-detector") | |
predict(img) |