Skip to content

Commit 93ce1f4

Browse files
committed
update the code for the download_file and document
1 parent 47430dc commit 93ce1f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/model_zoo/taskflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ddp("百度是一家高科技公司")
134134
>>> [{'word': ['百度', '', '一家', '高科技', '公司'], 'postag': ['ORG', 'v', 'm', 'n', 'n'], 'head': ['2', '0', '5', '5', '2'], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB'], 'prob': [1.0, 1.0, 1.0, 1.0, 1.0]}]
135135

136136
# 使用ddparser-ernie-1.0进行预测
137-
ddp = Taskflow("dependency_parsing",model="ddparser-ernie-1.0")
137+
ddp = Taskflow("dependency_parsing", model="ddparser-ernie-1.0")
138138
ddp("百度是一家高科技公司")
139139
>>> [{'word': ['百度', '', '一家', '高科技', '公司'], 'head': ['2', '0', '5', '5', '2'], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB']}]
140140
```

paddlenlp/taskflow/text_correction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _construct_model(self, model):
139139
pad_pinyin_id=self._pinyin_vocab[self._pinyin_vocab.pad_token])
140140
# Load the model parameter for the predict
141141
model_path = download_file(self._task_path, model + ".pdparams",
142-
URLS[model][0], URLS[model][1], model)
142+
URLS[model][0], URLS[model][1])
143143
state_dict = paddle.load(model_path)
144144
model_instance.set_state_dict(state_dict)
145145
model_instance.eval()

0 commit comments

Comments
 (0)