-
Notifications
You must be signed in to change notification settings - Fork 570
/
setup.py
99 lines (92 loc) · 2.7 KB
/
setup.py
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
"""
Donut
Copyright (c) 2022-present NAVER Corp.
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
"""
import os
from setuptools import find_packages, setup
ROOT = os.path.abspath(os.path.dirname(__file__))
def read_version():
data = {}
path = os.path.join(ROOT, "nougat", "_version.py")
with open(path, "r", encoding="utf-8") as f:
exec(f.read(), data)
return data["__version__"]
def read_long_description():
path = os.path.join(ROOT, "README.md")
with open(path, "r", encoding="utf-8") as f:
text = f.read()
return text
setup(
name="nougat-ocr",
version=read_version(),
description="Nougat: Neural Optical Understanding for Academic Documents",
long_description=read_long_description(),
long_description_content_type="text/markdown",
author="Lukas Blecher",
author_email="[email protected]",
url="https://github.com/facebookresearch/nougat",
license="MIT",
packages=find_packages(
exclude=[
"result",
]
),
py_modules=["predict", "app", "train", "test"],
python_requires=">=3.7",
install_requires=[
"transformers>=4.25.1",
"timm==0.5.4",
"orjson",
"opencv-python-headless",
"datasets[vision]",
"lightning>=2.0.0,<2022",
"nltk",
"python-Levenshtein",
"sentencepiece",
"sconf>=0.2.3",
"albumentations>=1.0.0",
"pypdf>=3.1.0",
"pypdfium2",
],
extras_require={
"api": [
"fastapi",
"uvicorn[standard]",
"python-multipart",
],
"dataset": [
"pytesseract",
"beautifulsoup4",
"scikit-learn",
"Pebble",
"pylatexenc",
"fuzzysearch",
"unidecode",
"htmlmin",
"pdfminer.six>=20221105",
],
},
entry_points={
"console_scripts": [
"nougat = predict:main",
"nougat_api = app:main",
],
},
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)