From 838febf48cbd4899dbb96819eea9dd8770c4df1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E6=B4=8B=E4=B8=89=E6=B4=8B?= <1258009915@qq.com> Date: Sun, 23 Jun 2024 22:13:51 +0800 Subject: [PATCH 1/2] Remove onnxruntime-gpu --- setup.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index fd37181..76f106f 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,10 @@ from setuptools import setup, find_packages -import platform + # Define the base dependencies install_requires = [ "torch", "torchvision", - "torchaudio", "transformers", "datasets", "evaluate", @@ -20,18 +19,13 @@ install_requires = [ "streamlit-paste-button", "shapely", "pyclipper", - "optimum[exporters]" -] -# Add platform-specific dependencies -if platform.system() == "Darwin": - install_requires.append("onnxruntime") -else: - install_requires.append("onnxruntime-gpu") + "optimum[exporters]", +] setup( name="texteller", - version="0.1.0", + version="0.1.2", author="OleehyO", author_email="1258009915@qq.com", description="A meta-package for installing dependencies", From bfb1810fb0a86b9a3f02752cfd713d1a2d4aa941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E6=B4=8B=E4=B8=89=E6=B4=8B?= <1258009915@qq.com> Date: Sun, 23 Jun 2024 22:14:05 +0800 Subject: [PATCH 2/2] Update README --- README.md | 3 ++- assets/README_zh.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d4499da..b910d6c 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,8 @@ Go to the `src/` directory and run the following command: Enter `http://localhost:8501` in a browser to view the web demo. > [!NOTE] -> If you are Windows user, please run the `start_web.bat` file instead. +> 1. For Windows users, please run the `start_web.bat` file. +> 2. When using onnxruntime + GPU for inference, you need to install onnxruntime-gpu. ## 🔍 Formula Detection diff --git a/assets/README_zh.md b/assets/README_zh.md index 4bbc907..4dee0f7 100644 --- a/assets/README_zh.md +++ b/assets/README_zh.md @@ -204,7 +204,8 @@ TexTeller默认使用轻量的[PaddleOCR](https://github.com/PaddlePaddle/Paddle 在浏览器里输入 `http://localhost:8501`就可以看到web demo > [!NOTE] -> 对于Windows用户, 请运行 `start_web.bat`文件。 +> 1. 对于Windows用户, 请运行 `start_web.bat`文件。 +> 2. 使用onnxruntime + gpu 推理时,需要安装onnxruntime-gpu ## 🔍 公式检测