Instructions to use apple/DFN-public with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apple/DFN-public with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="apple/DFN-public") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("apple/DFN-public") model = AutoModelForZeroShotImageClassification.from_pretrained("apple/DFN-public", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
AMLR license
Verified signaturef03932e
-
Update LICENSE
Verified signatureb3c434a
-
Update README.md
Verified signature8da9709 -
Upload 5 files
Verified signaturef97abfc -
Upload 2 files
Verified signature2c85cbb -
Update LICENSE
Verified signature7d9b598 -
initial commit
Verified signature78005cf