Skip to content

Commit 988204d

Browse files
authored
Update README.md and optimize DocPrompt postprocess (#3441)
* Update README.md * optimize sort * update * Update * Update * Update * Update * Update * Update * update * update * Add english docs and rename ernie_layout * Add english docs and rename ernie_layout * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * Update taskflow.md * update
1 parent a6b4691 commit 988204d

28 files changed

+997
-275
lines changed

docs/model_zoo/taskflow.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PaddleNLP提供**开箱即用**的产业级NLP预置任务能力,无需训练
4444
| [代码生成](#代码生成) | `Taskflow("code_generation")` |||| | | 代码生成大模型 |
4545
| [文图生成](#文图生成) | `Taskflow("text_to_image")` |||| | | 文图生成大模型 |
4646
| [文本摘要](#文本摘要) | `Taskflow("text_summarization")` ||||| | 文本摘要大模型 |
47-
| [文档智能](#文档智能) | `Taskflow("document_intelligence")` ||||| | 基于跨模态通用文档预训练模型ERNIE-LayoutX |
47+
| [文档智能](#文档智能) | `Taskflow("document_intelligence")` ||||| | 以多语言跨模态布局增强文档预训练模型ERNIE-Layout为核心底座 |
4848
| [问题生成](#问题生成) | `Taskflow("question_generation")` ||||| | 问题生成大模型 |
4949

5050
## QuickStart
@@ -1549,7 +1549,7 @@ from paddlenlp import Taskflow
15491549
</div></details>
15501550

15511551
### 文档智能
1552-
<details><summary>&emsp; 基于跨模态通用文档预训练模型ERNIE-LayoutX </summary><div>
1552+
<details><summary>&emsp; 以多语言跨模态布局增强文档预训练模型ERNIE-Layout为核心底座 </summary><div>
15531553

15541554
#### 输入格式
15551555

@@ -1573,7 +1573,7 @@ from paddlenlp import Taskflow
15731573
- 支持本地图片路径输入
15741574

15751575
<div align="center">
1576-
<img src=https://bj.bcebos.com/paddlenlp/taskflow/document_intelligence/images/resume.png height=800 hspace='20'/>
1576+
<img src=https://user-images.githubusercontent.com/40840292/194748579-f9e8aa86-7f65-4827-bfae-824c037228b3.png height=800 hspace='20'/>
15771577
</div>
15781578

15791579

@@ -1582,19 +1582,19 @@ from paddlenlp import Taskflow
15821582
>>> from paddlenlp import Taskflow
15831583

15841584
>>> docprompt = Taskflow("document_intelligence")
1585-
>>> docprompt([{"doc": "./resume.png", "prompt": ["五百丁本次想要担任的是什么职位?", "五百丁是在哪里上的大学?", "大学学的是什么专业?"]}])
1585+
>>> pprint(docprompt([{"doc": "./resume.png", "prompt": ["五百丁本次想要担任的是什么职位?", "五百丁是在哪里上的大学?", "大学学的是什么专业?"]}]))
15861586
[{'prompt': '五百丁本次想要担任的是什么职位?',
1587-
'result': [{'end': 183, 'prob': 1.0, 'start': 180, 'value': '客户经理'}]},
1588-
{'prompt': '五百丁是在哪里上的大学?',
1589-
'result': [{'end': 38, 'prob': 1.0, 'start': 32, 'value': '广州五百丁学院'}]},
1590-
{'prompt': '大学学的是什么专业?',
1591-
'result': [{'end': 45, 'prob': 0.74, 'start': 39, 'value': '金融学(本科)'}]}]
1587+
'result': [{'end': 7, 'prob': 1.0, 'start': 4, 'value': '客户经理'}]},
1588+
{'prompt': '五百丁是在哪里上的大学?',
1589+
'result': [{'end': 37, 'prob': 1.0, 'start': 31, 'value': '广州五百丁学院'}]},
1590+
{'prompt': '大学学的是什么专业?',
1591+
'result': [{'end': 44, 'prob': 0.82, 'start': 38, 'value': '金融学(本科)'}]}]
15921592
```
15931593

15941594
- http图片链接输入
15951595

15961596
<div align="center">
1597-
<img src=https://bj.bcebos.com/paddlenlp/taskflow/document_intelligence/images/invoice.jpg height=400 hspace='10'/>
1597+
<img src=https://user-images.githubusercontent.com/40840292/194748592-e20b2a5f-d36b-46fb-8057-86755d188af0.jpg height=400 hspace='10'/>
15981598
</div>
15991599

16001600

@@ -1603,13 +1603,13 @@ from paddlenlp import Taskflow
16031603
>>> from paddlenlp import Taskflow
16041604

16051605
>>> docprompt = Taskflow("document_intelligence")
1606-
>>> docprompt([{"doc": "https://bj.bcebos.com/paddlenlp/taskflow/document_intelligence/images/invoice.jpg", "prompt": ["发票号码是多少?", "校验码是多少?"]}])
1606+
>>> pprint(docprompt([{"doc": "https://bj.bcebos.com/paddlenlp/taskflow/document_intelligence/images/invoice.jpg", "prompt": ["发票号码是多少?", "校验码是多少?"]}]))
16071607
[{'prompt': '发票号码是多少?',
1608-
'result': [{'end': 10, 'prob': 0.96, 'start': 7, 'value': 'No44527206'}]},
1609-
{'prompt': '校验码是多少?',
1610-
'result': [{'end': 271,
1608+
'result': [{'end': 2, 'prob': 0.74, 'start': 2, 'value': 'No44527206'}]},
1609+
{'prompt': '校验码是多少?',
1610+
'result': [{'end': 233,
16111611
'prob': 1.0,
1612-
'start': 263,
1612+
'start': 231,
16131613
'value': '01107 555427109891646'}]}]
16141614
```
16151615

0 commit comments

Comments
 (0)