Zero-Shot Image Classification
Transformers
Safetensors
English
clip
fashion
multimodal
image-search
text-search
embeddings
contrastive-learning
zero-shot-classification
Instructions to use Leacb4/gap-clip with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Leacb4/gap-clip with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="Leacb4/gap-clip") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("Leacb4/gap-clip") model = AutoModelForZeroShotImageClassification.from_pretrained("Leacb4/gap-clip") - Notebooks
- Google Colab
- Kaggle
Upload __init__.py with huggingface_hub
Browse files- __init__.py +2 -3
__init__.py
CHANGED
|
@@ -25,14 +25,13 @@ __email__ = "lea.attia@gmail.com"
|
|
| 25 |
|
| 26 |
# Import main components for easy access
|
| 27 |
try:
|
| 28 |
-
from .color_model import ColorCLIP
|
| 29 |
from .training.hierarchy_model import Model as HierarchyModel, HierarchyExtractor
|
| 30 |
from .example_usage import load_models_from_hf, example_search
|
| 31 |
-
import config
|
| 32 |
|
| 33 |
__all__ = [
|
| 34 |
'ColorCLIP',
|
| 35 |
-
'Tokenizer',
|
| 36 |
'HierarchyModel',
|
| 37 |
'HierarchyExtractor',
|
| 38 |
'load_models_from_hf',
|
|
|
|
| 25 |
|
| 26 |
# Import main components for easy access
|
| 27 |
try:
|
| 28 |
+
from .training.color_model import ColorCLIP
|
| 29 |
from .training.hierarchy_model import Model as HierarchyModel, HierarchyExtractor
|
| 30 |
from .example_usage import load_models_from_hf, example_search
|
| 31 |
+
from . import config
|
| 32 |
|
| 33 |
__all__ = [
|
| 34 |
'ColorCLIP',
|
|
|
|
| 35 |
'HierarchyModel',
|
| 36 |
'HierarchyExtractor',
|
| 37 |
'load_models_from_hf',
|