Leacb4 commited on
Commit
fc5b142
·
verified ·
1 Parent(s): 829e21c

Upload setup.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. setup.py +125 -0
setup.py ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Setup script for GAP-CLIP (Guaranteed Attribute Positioning in CLIP)
3
+
4
+ This setup file allows installation of the GAP-CLIP package and its dependencies.
5
+
6
+ Installation:
7
+ pip install -e . # Editable/development install
8
+ pip install . # Standard install
9
+ pip install -e ".[dev]" # Install with development dependencies
10
+ pip install -e ".[optuna]" # Install with hyperparameter optimization tools
11
+ """
12
+
13
+ from setuptools import setup, find_packages
14
+ import os
15
+
16
+ # Read the README file for long description
17
+ def read_readme():
18
+ """Read README.md for the long description."""
19
+ readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
20
+ if os.path.exists(readme_path):
21
+ with open(readme_path, 'r', encoding='utf-8') as f:
22
+ return f.read()
23
+ return ""
24
+
25
+ # Core dependencies
26
+ INSTALL_REQUIRES = [
27
+ 'torch>=2.0.0',
28
+ 'torchvision>=0.15.0',
29
+ 'transformers>=4.30.0',
30
+ 'huggingface-hub>=0.16.0',
31
+ 'pillow>=9.0.0',
32
+ 'pandas>=1.5.0',
33
+ 'numpy>=1.24.0',
34
+ 'scikit-learn>=1.3.0',
35
+ 'tqdm>=4.65.0',
36
+ 'matplotlib>=3.7.0',
37
+ 'seaborn>=0.12.0',
38
+ 'requests>=2.28.0',
39
+ 'aiohttp>=3.8.0',
40
+ ]
41
+
42
+ # Optional dependencies for hyperparameter optimization
43
+ OPTUNA_REQUIRES = [
44
+ 'optuna>=3.0.0',
45
+ ]
46
+
47
+ # Optional dependencies for development
48
+ DEV_REQUIRES = [
49
+ 'pytest>=7.0.0',
50
+ 'black>=23.0.0',
51
+ 'flake8>=6.0.0',
52
+ 'mypy>=1.0.0',
53
+ 'jupyter>=1.0.0',
54
+ 'ipython>=8.0.0',
55
+ ]
56
+
57
+ # All optional dependencies
58
+ EXTRAS_REQUIRE = {
59
+ 'optuna': OPTUNA_REQUIRES,
60
+ 'dev': DEV_REQUIRES,
61
+ 'all': OPTUNA_REQUIRES + DEV_REQUIRES,
62
+ }
63
+
64
+ setup(
65
+ name='gap-clip',
66
+ version='1.0.0',
67
+ author='Lea Attia Sarfati',
68
+ author_email='lea.attia@gmail.com',
69
+ description='GAP-CLIP: Guaranteed Attribute Positioning in CLIP Embeddings for Fashion Search',
70
+ long_description=read_readme(),
71
+ long_description_content_type='text/markdown',
72
+ url='https://github.com/Leacb4/gap-clip', # Update with your repository URL
73
+ project_urls={
74
+ 'Documentation': 'https://github.com/Leacb4/gap-clip#readme',
75
+ 'Source': 'https://github.com/Leacb4/gap-clip',
76
+ 'Bug Reports': 'https://github.com/Leacb4/gap-clip/issues',
77
+ 'Hugging Face': 'https://huggingface.co/Leacb4/gap-clip',
78
+ },
79
+ packages=find_packages(exclude=['tests', 'tests.*', 'evaluation', 'optuna', 'data']),
80
+ classifiers=[
81
+ 'Development Status :: 4 - Beta',
82
+ 'Intended Audience :: Developers',
83
+ 'Intended Audience :: Science/Research',
84
+ 'License :: OSI Approved :: MIT License', # Update if different
85
+ 'Programming Language :: Python :: 3',
86
+ 'Programming Language :: Python :: 3.8',
87
+ 'Programming Language :: Python :: 3.9',
88
+ 'Programming Language :: Python :: 3.10',
89
+ 'Programming Language :: Python :: 3.11',
90
+ 'Topic :: Scientific/Engineering :: Artificial Intelligence',
91
+ 'Topic :: Scientific/Engineering :: Image Recognition',
92
+ 'Topic :: Software Development :: Libraries :: Python Modules',
93
+ ],
94
+ python_requires='>=3.8',
95
+ install_requires=INSTALL_REQUIRES,
96
+ extras_require=EXTRAS_REQUIRE,
97
+ entry_points={
98
+ 'console_scripts': [
99
+ 'gap-clip-train=train_main_model:main', # Command to train the model
100
+ 'gap-clip-example=example_usage:main', # Command to run examples
101
+ ],
102
+ },
103
+ include_package_data=True,
104
+ package_data={
105
+ '': [
106
+ '*.json', # Include tokenizer vocab files
107
+ '*.md', # Include markdown files
108
+ ],
109
+ },
110
+ keywords=[
111
+ 'machine-learning',
112
+ 'deep-learning',
113
+ 'computer-vision',
114
+ 'fashion',
115
+ 'clip',
116
+ 'multimodal',
117
+ 'image-search',
118
+ 'text-search',
119
+ 'embeddings',
120
+ 'contrastive-learning',
121
+ 'pytorch',
122
+ 'transformers',
123
+ ],
124
+ zip_safe=False,
125
+ )