Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a pip install option #98

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ poetry install
pip install -e .
# or
pip install -r pyproject.toml
# or
pip install -r requirements.txt
```

### 🛳️ Docker
Expand Down
1 change: 1 addition & 0 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import argparse
from omniparse import load_omnimodel

os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

def download_models():
parser = argparse.ArgumentParser(description="Download models for omniparse")
Expand Down
2 changes: 2 additions & 0 deletions omniparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from marker.models import load_all_models
# from omniparse.documents.models import load_all_models

import os


class SharedState(BaseModel):
model_list: Any = None
Expand Down
153 changes: 153 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
aiofiles==23.2.1
annotated-types==0.7.0
anyio==4.6.2.post1
art==6.3
attrs==24.2.0
beautifulsoup4==4.12.3
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
coloredlogs==15.0.1
contourpy==1.3.0
cycler==0.12.1
decorator==4.4.2
deprecated==1.2.14
dnspython==2.7.0
einops==0.8.0
email-validator==2.2.0
exceptiongroup==1.2.2
fastapi-cli==0.0.5
fastapi==0.111.1
ffmpy==0.4.0
filelock==3.16.1
filetype==1.2.0
# flash-attn==2.6.3
flatbuffers==24.3.25
fonttools==4.54.1
fsspec==2024.9.0
ftfy==6.3.0
gradio-client==1.3.0
gradio==4.44.1
grpcio==1.66.2
h11==0.14.0
html2text==2024.2.26
httpcore==1.0.6
httptools==0.6.2
httpx==0.27.2
huggingface-hub==0.25.2
humanfriendly==10.0
idna==3.10
imageio-ffmpeg==0.5.1
imageio==2.36.0
img2pdf==0.5.1
importlib-resources==6.4.5
intel-openmp==2021.4.0
jinja2==3.1.4
joblib==1.4.2
kiwisolver==1.4.7
llvmlite==0.43.0
lxml==5.3.0
markdown-it-py==3.0.0
marker-pdf==0.2.16
markupsafe==2.1.5
matplotlib==3.9.2
mdurl==0.1.2
mkl==2021.4.0
more-itertools==10.5.0
moviepy==1.0.3
mpmath==1.3.0
networkx==3.4.1
nltk==3.9.1
numba==0.60.0
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.6.77
nvidia-nvtx-cu12==12.1.105
onnxruntime==1.19.2
openai-whisper==20231117
opencv-python==4.10.0.84
orjson==3.10.7
outcome==1.3.0.post0
packaging==24.1
pandas==2.2.3
pdftext==0.3.13
pikepdf==9.3.0
pillow==10.4.0
proglog==0.1.10
protobuf==5.28.2
pycparser==2.22
pydantic-core==2.23.4
pydantic-settings==2.5.2
pydantic==2.9.2
pydub==0.25.1
pygments==2.18.0
pyparsing==3.2.0
pypdfium2==4.30.0
pyreadline3==3.5.4
pysocks==1.7.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.12
pytube==15.0.0
pytz==2024.2
pyyaml==6.0.2
rapidfuzz==3.10.0
regex==2024.9.11
requests==2.32.3
rich==13.9.2
ruff==0.6.9
safetensors==0.4.5
scikit-learn==1.4.2
scipy==1.14.1
selenium==4.25.0
semantic-version==2.10.0
setuptools==75.1.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.6
starlette==0.37.2
surya-ocr==0.4.15
sympy==1.13.3
tabulate==0.9.0
tbb==2021.13.1
texify==0.1.10
threadpoolctl==3.5.0
tiktoken==0.8.0
timm==1.0.10
tokenizers==0.20.1
tomlkit==0.12.0
torch==2.3.1
torchvision==0.18.1
tqdm==4.66.5
transformers==4.45.2
trio-websocket==0.11.1
trio==0.26.2
triton==2.3.1
typer==0.12.5
typing-extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
urllib3[socks]==2.2.3
uvicorn==0.29.0
uvicorn[standard]==0.29.0
uvloop==0.21.0
watchfiles==0.24.0
wcwidth==0.2.13
webdriver-manager==4.0.2
websocket-client==1.8.0
websockets==12.0
wrapt==1.16.0
wsproto==1.2.0
2 changes: 2 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
app.include_router(website_router, prefix="/parse_website", tags=["Website"])
app = gr.mount_gradio_app(app, demo_ui, path="")

import os
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

def main():
# Parse command-line arguments
Expand Down