Changesets · Branches · Tags · Compare
| Changeset | 52c77c2c9fdcdc2af1592f4f2d7fa617fc5e1dd1e1eb35bb52272ee6ab9d66dd |
|---|---|
| Author | Prince Canuma <prince.gdt@gmail.com> · 2024-04-23 02:10 +02:00 |
| Committer | Prince Canuma <prince.gdt@gmail.com> · 2024-04-23 02:10 +02:00 |
| Parents | da80fb4190fd |
5 files changed
modified .github/workflows/python-publish.yml +1 −0
| @@ -32,3 +32,4 @@ | ||
| 32 | 32 | with: |
| 33 | 33 | user: __token__ |
| 34 | 34 | password: ${{ secrets.PYPI_API_TOKEN }} |
| 35 | + packages_dir: dist |
deleted mlx_vlm/requirements.txt +0 −7
| @@ -1,7 +0,0 @@ | ||
| 1 | -mlx>=0.8.0 | |
| 2 | -mlx-lm>=0.4.0 | |
| 3 | -numpy | |
| 4 | -transformers | |
| 5 | -torch | |
| 6 | -huggingface_hub | |
| 7 | -Pillow |
modified mlx_vlm/version.py +0 −2
| @@ -1,3 +1,1 @@ | ||
| 1 | - | |
| 2 | - | |
| 3 | 1 | __version__ = "0.0.1" |
added requirements.txt +8 −0
| @@ -0,0 +1,8 @@ | ||
| 1 | +mlx>=0.8.0 | |
| 2 | +mlx-lm>=0.4.0 | |
| 3 | +numpy | |
| 4 | +transformers | |
| 5 | +torch | |
| 6 | +huggingface_hub | |
| 7 | +Pillow | |
| 8 | +requests |
modified setup.py +15 −8
| @@ -1,27 +1,34 @@ | ||
| 1 | 1 | import sys |
| 2 | 2 | from pathlib import Path |
| 3 | - | |
| 4 | 3 | from setuptools import setup, find_packages |
| 5 | 4 | |
| 6 | -package_dir = Path(__file__).parent / "mlx_vlm" | |
| 7 | -with open(package_dir / "requirements.txt") as fid: | |
| 8 | - requirements = [l.strip() for l in fid.readlines()] | |
| 5 | +# Get the project root directory | |
| 6 | +root_dir = Path(__file__).parent | |
| 9 | 7 | |
| 8 | +# Add the package directory to the Python path | |
| 9 | +package_dir = root_dir / "mlx_vlm" | |
| 10 | 10 | sys.path.append(str(package_dir)) |
| 11 | + | |
| 12 | +# Read the requirements from the requirements.txt file | |
| 13 | +requirements_path = root_dir / "requirements.txt" | |
| 14 | +with open(requirements_path) as fid: | |
| 15 | + requirements = [l.strip() for l in fid.readlines()] | |
| 16 | + | |
| 17 | +# Import the version from the package | |
| 11 | 18 | from version import __version__ |
| 12 | 19 | |
| 20 | +# Setup configuration | |
| 13 | 21 | setup( |
| 14 | 22 | name="mlx-vlm", |
| 15 | 23 | version=__version__, |
| 16 | 24 | description="Vision LLMs on Apple silicon with MLX and the Hugging Face Hub", |
| 17 | - long_description=open("README.md", encoding="utf-8").read(), | |
| 25 | + long_description=open(root_dir / "README.md", encoding="utf-8").read(), | |
| 18 | 26 | long_description_content_type="text/markdown", |
| 19 | - readme="README.md", | |
| 20 | 27 | author_email="prince.gdt@gmail.com", |
| 21 | 28 | author="MLX Contributors", |
| 22 | 29 | url="https://github.com/Blaizzy/mlx-vlm", |
| 23 | 30 | license="MIT", |
| 24 | 31 | install_requires=requirements, |
| 25 | - packages=find_packages(), | |
| 32 | + packages=find_packages(where=root_dir), | |
| 26 | 33 | python_requires=">=3.8", |
| 27 | -) | |
| 34 | +) | |
| No newline at the end of the file |