Instructions to use MBZUAI/swiftformer-l3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MBZUAI/swiftformer-l3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="MBZUAI/swiftformer-l3") 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("MBZUAI/swiftformer-l3") model = AutoModelForImageClassification.from_pretrained("MBZUAI/swiftformer-l3") - Notebooks
- Google Colab
- Kaggle
Update README.md
#1
by nikeke19pc - opened
README.md
CHANGED
|
@@ -28,7 +28,7 @@ SwiftFormer paper introduces a novel efficient additive attention mechanism that
|
|
| 28 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 29 |
|
| 30 |
from transformers import ViTImageProcessor
|
| 31 |
-
processor = ViTImageProcessor.from_pretrained('
|
| 32 |
inputs = processor(images=image, return_tensors="pt")
|
| 33 |
|
| 34 |
|
|
|
|
| 28 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 29 |
|
| 30 |
from transformers import ViTImageProcessor
|
| 31 |
+
processor = ViTImageProcessor.from_pretrained('MBZUAI/swiftformer-l3')
|
| 32 |
inputs = processor(images=image, return_tensors="pt")
|
| 33 |
|
| 34 |
|