RealFalconsAI
commited on
Commit
•
76856d7
1
Parent(s):
5483988
Update README.md
Browse files
README.md
CHANGED
@@ -26,8 +26,10 @@ Here is how to use this model to classifiy an image based on 1 of 2 classes (nor
|
|
26 |
```markdown
|
27 |
|
28 |
# Use a pipeline as a high-level helper
|
|
|
29 |
from transformers import pipeline
|
30 |
|
|
|
31 |
classifier = pipeline("image-classification", model="RealFalconsAI/nsfw_image_detection")
|
32 |
classifier(image)
|
33 |
|
|
|
26 |
```markdown
|
27 |
|
28 |
# Use a pipeline as a high-level helper
|
29 |
+
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(image)
|
35 |
|