mstatt commited on
Commit
6ac0734
1 Parent(s): e1c9591

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -30,7 +30,7 @@ from PIL import Image
30
  from transformers import pipeline
31
 
32
  img = Image.open("<path_to_image_file>")
33
- classifier = pipeline("image-classification", model="RealFalconsAI/nsfw_image_detection")
34
  classifier(img)
35
 
36
  ```
@@ -45,8 +45,8 @@ from PIL import Image
45
  from transformers import AutoModelForImageClassification, ViTImageProcessor
46
 
47
  img = Image.open("<path_to_image_file>")
48
- model = AutoModelForImageClassification.from_pretrained("RealFalconsAI/nsfw_image_detection")
49
- processor = ViTImageProcessor.from_pretrained('RealFalconsAI/nsfw_image_detection')
50
  with torch.no_grad():
51
  inputs = processor(images=img, return_tensors="pt")
52
  outputs = model(**inputs)
 
30
  from transformers import pipeline
31
 
32
  img = Image.open("<path_to_image_file>")
33
+ classifier = pipeline("image-classification", model="Falconsai/nsfw_image_detection")
34
  classifier(img)
35
 
36
  ```
 
45
  from transformers import AutoModelForImageClassification, ViTImageProcessor
46
 
47
  img = Image.open("<path_to_image_file>")
48
+ model = AutoModelForImageClassification.from_pretrained("Falconsai/nsfw_image_detection")
49
+ processor = ViTImageProcessor.from_pretrained('Falconsai/nsfw_image_detection')
50
  with torch.no_grad():
51
  inputs = processor(images=img, return_tensors="pt")
52
  outputs = model(**inputs)