Skip to content
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
17 changes: 10 additions & 7 deletions skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ This directory contains official PaddleOCR Agent Skills. They integrate with AI

## Prerequisites

1. Python 3.8 or later must be installed on the device that runs the skill.
2. These skills depend on PaddleOCR official APIs and require API credentials. Visit the [PaddleOCR website](https://www.paddleocr.com), click **API**, select the model you need, then copy the `API_URL` and `Token`. They correspond to the API URL and access token used for authentication. Supported models per skill:
1. Python 3.9 or later must be installed on the device that runs the skill.
2. These skills depend on PaddleOCR official APIs and require API credentials. Visit the [PaddleOCR website](https://www.paddleocr.com), click **API**, select the model you need, select the language for the text recognition model, then copy the `API_URL` and `Token`. They correspond to the API URL and access token used for authentication. Supported model per skill:
- `paddleocr-text-recognition`: `PP-OCRv5`
- `paddleocr-doc-parsing`: `PP-StructureV3`, `PaddleOCR-VL`, `PaddleOCR-VL-1.5`

Expand All @@ -34,6 +34,7 @@ npx skills add PaddlePaddle/PaddleOCR -g --skill paddleocr-doc-parsing -y
> ```shell
> git clone https://github.com/PaddlePaddle/PaddleOCR.git
> npx skills add ./PaddleOCR/skills/paddleocr-text-recognition
> npx skills add ./PaddleOCR/skills/paddleocr-doc-parsing
> ```

#### Option 2: Install via `clawhub` (OpenClaw)
Expand Down Expand Up @@ -65,8 +66,8 @@ After installation, configure the required environment variables so the skills c

| Skill | Required | Optional |
| --- | --- | --- |
| `paddleocr-text-recognition` | `PADDLEOCR_OCR_API_URL` (API URL), `PADDLEOCR_ACCESS_TOKEN` (access token) | `PADDLEOCR_OCR_TIMEOUT` (API request timeout) |
| `paddleocr-doc-parsing` | `PADDLEOCR_DOC_PARSING_API_URL` (API URL), `PADDLEOCR_ACCESS_TOKEN` (access token) | `PADDLEOCR_DOC_PARSING_TIMEOUT` (API request timeout) |
| `paddleocr-text-recognition` | `PADDLEOCR_OCR_API_URL` (full endpoint URL ending with `/ocr`), `PADDLEOCR_ACCESS_TOKEN` (access token) | `PADDLEOCR_OCR_TIMEOUT` (API request timeout) |
| `paddleocr-doc-parsing` | `PADDLEOCR_DOC_PARSING_API_URL` (full endpoint URL ending with `/layout-parsing`), `PADDLEOCR_ACCESS_TOKEN` (access token) | `PADDLEOCR_DOC_PARSING_TIMEOUT` (API request timeout) |

Below are configuration methods for some AI apps:

Expand Down Expand Up @@ -150,10 +151,10 @@ Make sure your working directory is the directory containing this file.
1. Install dependencies.

```shell
python -m pip install -r paddleocr-text-recognition/scripts/requirements.txt
python -m pip install -r paddleocr-doc-parsing/scripts/requirements.txt
python -m pip install -r paddleocr-text-recognition/requirements.txt
python -m pip install -r paddleocr-doc-parsing/requirements.txt
# Optional: required only when using document file optimization
python -m pip install -r paddleocr-doc-parsing/scripts/requirements-optimize.txt
python -m pip install -r paddleocr-doc-parsing/requirements-optimize.txt
```

2. Configure environment variables (see [Configure Environment Variables](#configure-environment-variables) for the list of variables).
Expand All @@ -170,3 +171,5 @@ Make sure your working directory is the directory containing this file.
python paddleocr-text-recognition/scripts/smoke_test.py
python paddleocr-doc-parsing/scripts/smoke_test.py
```

Use `--skip-api-test` to verify configuration only (no network call). Use `--test-url "https://..."` to override the default sample document/image URL.
17 changes: 10 additions & 7 deletions skills/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

## 准备工作

1. 请确保执行 skill 的设备安装有 Python 3.8 或以上版本。
2. Skill 底层依赖于 PaddleOCR 官方 API,因此需要配置相关凭证才能使用。可以在 [PaddleOCR 官网](https://www.paddleocr.com) 点击 **API**,选择需要用到的算法,然后复制 `API_URL` 和 `Token`,它们分别对应服务的 API URL 和用户鉴权使用的 access token。各 skill 支持的算法如下
1. 请确保执行 skill 的设备安装有 Python 3.9 或以上版本。
2. Skill 底层依赖于 PaddleOCR 官方 API,因此需要配置相关凭证才能使用。可以在 [PaddleOCR 官网](https://www.paddleocr.com) 点击 **API**,选择需要用到的模型,选择语言(对于文字识别模型),然后复制 `API_URL` 和 `Token`,它们分别对应服务的 API URL 和用户鉴权使用的 access token。各 skill 支持的模型如下
- `paddleocr-text-recognition`:`PP-OCRv5`
- `paddleocr-doc-parsing`:`PP-StructureV3`、`PaddleOCR-VL`、`PaddleOCR-VL-1.5`

Expand All @@ -34,6 +34,7 @@ npx skills add PaddlePaddle/PaddleOCR -g --skill paddleocr-doc-parsing -y
> ```shell
> git clone https://github.com/PaddlePaddle/PaddleOCR.git
> npx skills add ./PaddleOCR/skills/paddleocr-text-recognition
> npx skills add ./PaddleOCR/skills/paddleocr-doc-parsing
> ```

#### 方式二:通过 `clawhub` 安装(OpenClaw)
Expand Down Expand Up @@ -65,8 +66,8 @@ git clone https://github.com/PaddlePaddle/PaddleOCR.git

| Skill | 必填 | 可选 |
| --- | --- | --- |
| `paddleocr-text-recognition` | `PADDLEOCR_OCR_API_URL`(API URL)、`PADDLEOCR_ACCESS_TOKEN`(access token) | `PADDLEOCR_OCR_TIMEOUT`(API 请求超时时间) |
| `paddleocr-doc-parsing` | `PADDLEOCR_DOC_PARSING_API_URL`(API URL)、`PADDLEOCR_ACCESS_TOKEN`(access token) | `PADDLEOCR_DOC_PARSING_TIMEOUT`(API 请求超时时间) |
| `paddleocr-text-recognition` | `PADDLEOCR_OCR_API_URL`(完整端点 URL,须以 `/ocr` 结尾)、`PADDLEOCR_ACCESS_TOKEN`(access token) | `PADDLEOCR_OCR_TIMEOUT`(API 请求超时时间) |
| `paddleocr-doc-parsing` | `PADDLEOCR_DOC_PARSING_API_URL`(完整端点 URL,须以 `/layout-parsing` 结尾)、`PADDLEOCR_ACCESS_TOKEN`(access token) | `PADDLEOCR_DOC_PARSING_TIMEOUT`(API 请求超时时间) |

以下是部分 AI 应用的配置方式:

Expand Down Expand Up @@ -150,10 +151,10 @@ git clone https://github.com/PaddlePaddle/PaddleOCR.git
1. 安装依赖库。

```shell
python -m pip install -r paddleocr-text-recognition/scripts/requirements.txt
python -m pip install -r paddleocr-doc-parsing/scripts/requirements.txt
python -m pip install -r paddleocr-text-recognition/requirements.txt
python -m pip install -r paddleocr-doc-parsing/requirements.txt
# 可选依赖,仅在优化文档文件大小时需要
python -m pip install -r paddleocr-doc-parsing/scripts/requirements-optimize.txt
python -m pip install -r paddleocr-doc-parsing/requirements-optimize.txt
```

2. 配置环境变量(需要配置的变量参见[配置环境变量](#配置环境变量)一节)。
Expand All @@ -170,3 +171,5 @@ git clone https://github.com/PaddlePaddle/PaddleOCR.git
python paddleocr-text-recognition/scripts/smoke_test.py
python paddleocr-doc-parsing/scripts/smoke_test.py
```

使用 `--skip-api-test` 可只做配置检查(不发网络请求)。使用 `--test-url "https://..."` 可指定自定义测试用文档/图片 URL。
Loading
Loading