File size: 259 Bytes
f767579
 
 
 
 
 
1
2
3
4
5
6
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)