diff --git a/.DS_Store b/.DS_Store index 71cb1ef..e76270b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/README.md b/README.md index 62a774a..58454f9 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Here's an example of the entire process: from apple_ocr.ocr import OCR from PIL import Image -image = Image open("your_image.png") +image = Image.open("your_image.png") ocr_instance = OCR(image=image) dataframe = ocr_instance.recognize() cluster_labels = ocr_instance.cluster(dataframe, num_clusters=3) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9f9f20e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[project] +name = "apple-ocr" +version = "1.0.8" +description = "An OCR (Optical Character Recognition) utility for text extraction from images." +readme = "README.md" +keywords = ["OCR", "image-recognition", "text-extraction", "clustering", "Apple Vision", "NLP", "LLM", "data"] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: Apache Software License", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules" +] + +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[options] +packages = ["find:"] +install_requires = [ + "torch", + "numpy", + "pandas", + "Pillow", + "scikit-learn", + "plotly", + "pyobjc" +] + +[metadata] +name = "apple-ocr" +version = "1.0.8" +license = "Apache License 2.0" +author = "Louis Brulé Naudet" +author_email = "louisbrulenaudet@icloud.com" +description = "An OCR (Optical Character Recognition) utility for text extraction from images." +long_description = "file: README.md" +long_description_content_type = "text/markdown" +url = "https://github.com/louisbrulenaudet/apple-ocr" +homepage = "https://github.com/louisbrulenaudet/apple-ocr" +project_urls = {repository = "https://github.com/louisbrulenaudet/apple-ocr"} +keywords = "OCR, image-recognition, text-extraction, clustering, Apple Vision, NLP, LLM, data" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 030045d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,39 +0,0 @@ -[metadata] -name = apple-ocr -version = 1.0.5 -license = Apache License 2.0 -author = Louis Brulé Naudet -author_email = louisbrulenaudet@icloud.com -description = An OCR (Optical Character Recognition) utility for text extraction from images. -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/louisbrulenaudet/apple-ocr -download_url= https://github.com/louisbrulenaudet/apple-ocr/archive/refs/tags/1.0.5.tar.gz -project_urls = - repository = https://github.com/louisbrulenaudet/apple-ocr -keywords = OCR, image-recognition, text-extraction, clustering, Apple Vision, NLP, LLM, data -classifiers = - Programming Language :: Python - Programming Language :: Python :: 3 - Intended Audience :: Education - Intended Audience :: Science/Research - License :: OSI Approved :: Apache Software License - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: Artificial Intelligence - Topic :: Software Development - Topic :: Software Development :: Libraries - Topic :: Software Development :: Libraries :: Python Modules - -[options] -packages = find: -install_requires = - torch - numpy - pandas - Pillow - scikit-learn - plotly - pyobjc - -[options.packages.find] -where = apple_ocr diff --git a/setup.py b/setup.py deleted file mode 100644 index 6131515..0000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name="apple-ocr", - version="1.0.5", - license="Apache License 2.0", - author="Louis Brulé Naudet", - author_email="louisbrulenaudet@icloud.com", - description="An OCR (Optical Character Recognition) utility for text extraction from images.", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - url="https://github.com/louisbrulenaudet/apple-ocr", - homepage="https://github.com/louisbrulenaudet/apple-ocr", - download_url="https://github.com/louisbrulenaudet/apple-ocr/archive/refs/tags/1.0.5.tar.gz", - project_urls={"repository": "https://github.com/louisbrulenaudet/apple-ocr"}, - keywords="OCR, image-recognition, text-extraction, clustering, Apple Vision, NLP, LLM, data", - classifiers=[ - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Intended Audience :: Education", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: Apache Software License", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - packages=find_packages(where="apple_ocr"), - py_modules=["apple_ocr"], - package_dir={"": "apple_ocr"}, - install_requires=[ - "torch", - "numpy", - "pandas", - "Pillow", - "scikit-learn", - "plotly", - "pyobjc", - ], -) \ No newline at end of file diff --git a/apple_ocr/.DS_Store b/src/.DS_Store similarity index 90% rename from apple_ocr/.DS_Store rename to src/.DS_Store index 4a88c3e..78c9b65 100644 Binary files a/apple_ocr/.DS_Store and b/src/.DS_Store differ diff --git a/apple_ocr/__init__.py b/src/apple_ocr/__init__.py similarity index 78% rename from apple_ocr/__init__.py rename to src/apple_ocr/__init__.py index 5446305..fa1a59f 100644 --- a/apple_ocr/__init__.py +++ b/src/apple_ocr/__init__.py @@ -2,6 +2,4 @@ # This file can be empty, or you can define package-level variables or settings here. # For example, you might define a variable like this: -# version = "1.0.0" - -from ocr.py import OCR \ No newline at end of file +# version = "1.0.0" \ No newline at end of file diff --git a/apple_ocr/ocr.py b/src/apple_ocr/ocr.py similarity index 100% rename from apple_ocr/ocr.py rename to src/apple_ocr/ocr.py