Instructions to use Falconsai/nsfw_image_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Falconsai/nsfw_image_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Falconsai/nsfw_image_detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("Falconsai/nsfw_image_detection") model = AutoModelForImageClassification.from_pretrained("Falconsai/nsfw_image_detection") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
aa3a026
1
Parent(s): 76856d7
Update README.md
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ 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(
|
| 35 |
|
| 36 |
```
|
| 37 |
|
|
|
|
| 31 |
|
| 32 |
img = Image.open("<path_to_image_file>")
|
| 33 |
classifier = pipeline("image-classification", model="RealFalconsAI/nsfw_image_detection")
|
| 34 |
+
classifier(img)
|
| 35 |
|
| 36 |
```
|
| 37 |
|