diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5ffc1ad --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +exclude **\*.pth diff --git a/README.md b/README.md index ad5fc14..e0af745 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To run the model you need Python 3.7+ Install the package `pix2tex`: -```pip install git+https://github.com/lukas-blecher/LaTeX-OCR.git``` +```pip install pix2tex``` Model checkpoints will be automatically downloaded. diff --git a/pix2tex/model/checkpoints/get_latest_checkpoint.py b/pix2tex/model/checkpoints/get_latest_checkpoint.py index 8e12341..b46329b 100644 --- a/pix2tex/model/checkpoints/get_latest_checkpoint.py +++ b/pix2tex/model/checkpoints/get_latest_checkpoint.py @@ -35,7 +35,7 @@ def download_as_bytes_with_progress(url: str, name: str = None) -> bytes: def download_checkpoints(): - tag = get_latest_tag() + tag = 'v0.0.1' # get_latest_tag() path = os.path.dirname(__file__) print('download weights', tag, 'to path', path) weights = 'https://github.com/lukas-blecher/LaTeX-OCR/releases/download/%s/weights.pth' % tag diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..08aedd7 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description_file = README.md diff --git a/setup.py b/setup.py index aa185b3..858133b 100644 --- a/setup.py +++ b/setup.py @@ -2,17 +2,30 @@ import setuptools +# read the contents of your README file +from pathlib import Path +this_directory = Path(__file__).parent +long_description = (this_directory / "README.md").read_text() + setuptools.setup( name='pix2tex', - version='0.0.1', + version='0.0.4', description="pix2tex: Using a ViT to convert images of equations into LaTeX code.", + long_description=long_description, + long_description_content_type='text/markdown', author='Lukas Blecher', + author_email='luk.blecher@gmail.com', url='https://lukas-blecher.github.io/LaTeX-OCR/', + license='MIT', + keywords=[ + 'artificial intelligence', + 'deep learning', + 'image to text' + ], packages=setuptools.find_packages(), package_data={ 'pix2tex': [ 'resources/*', - 'model/checkpoints/*.pth', 'model/settings/*.yaml', 'model/dataset/*.json', ] @@ -52,5 +65,12 @@ 'pix2tex_gui = pix2tex.gui:main', 'pix2tex_cli = pix2tex.cli:main', ], - } + }, + classifiers=[ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Science/Research', + 'Topic :: Scientific/Engineering :: Artificial Intelligence', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.7', + ], )