File size: 1,634 Bytes
fac3f86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
01ca95a
38783e1
 
 
 
 
01ca95a
fac3f86
 
 
 
 
38783e1
 
 
fac3f86
38783e1
fac3f86
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"""
GAP-CLIP: Guaranteed Attribute Positioning in CLIP Embeddings
==============================================================

A multimodal fashion search model that combines color embeddings, 
hierarchical category embeddings, and general CLIP capabilities.

Main Components:
    - ColorCLIP: Specialized color embedding model (16 dims)
    - HierarchyModel: Category classification model (64 dims)
    - GAP-CLIP: Main CLIP model with aligned subspaces (512 dims)

Quick Start:
    >>> from gap_clip import load_models_from_hf
    >>> models = load_models_from_hf("Leacb4/gap-clip")
    >>> # Use models for search...

For more information, see the README.md file or visit:
https://huggingface.co/Leacb4/gap-clip
"""

__version__ = "1.0.0"
__author__ = "Lea Attia Sarfati"
__email__ = "lea.attia@gmail.com"

# Import main components for easy access
try:
    from .training.color_model import ColorCLIP
    from .training.hierarchy_model import HierarchyModel, HierarchyExtractor
    from .example_usage import (
        load_gap_clip, get_image_embedding_from_url, get_text_embedding,
        load_models_from_hf, load_models_from_local, example_search,
    )
    from . import config
    
    __all__ = [
        'ColorCLIP',
        'HierarchyModel',
        'HierarchyExtractor',
        'load_gap_clip',
        'get_image_embedding_from_url',
        'get_text_embedding',
        'load_models_from_hf',
        'load_models_from_local',
        'example_search',
        'config',
        '__version__',
    ]
except ImportError:
    # If imports fail, it's ok - the package can still be used
    __all__ = ['__version__']