Skip to content

Commit

Permalink
Update README_Model_Uploading.md (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
chg0901 authored Apr 29, 2024
2 parents 94de37a + 309b80b commit fc68a7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/README_Model_Uploading.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ ModelScope平台内的模型创建和OpenXLab, 这里不再赘述, 可以点击[

### 使用Python SDK上传模型

可以使用modelscope modelhub来将已经训练好的模型上传到ModelScope平台,
可以使用modelscope HubApi来将已经训练好的模型上传到ModelScope平台,

ModelScope的上传比OpenXLab简单不少, 在ModelScope社区网页创建对应模型之后,只需要**配置访问令牌(请从ModelScope`个人中心->访问令牌获取`)**, 然后将本地模型目录通过push_model接口进行上传即可.

Expand All @@ -234,13 +234,13 @@ ModelScope的上传比OpenXLab简单不少, 在ModelScope社区网页创建对
```python
from modelscope.hub.api import HubApi

YOUR_ACCESS_TOKEN = '请从ModelScope个人中心->访问令牌获取'
YOUR_ACCESS_TOKEN = '请从ModelScope个人中心->访问令牌获取(SDK 令牌)'

api = HubApi()
api.login(YOUR_ACCESS_TOKEN)
api.push_model(
model_id="yourname/your_model_id",
model_dir="my_model_dir" # 本地模型目录,要求目录中必须包含configuration.json
model_id="your_name/your_model_id",
model_dir="your_model_model_dir" # 本地模型目录,要求目录中必须包含configuration.json
)
```

Expand Down

0 comments on commit fc68a7c

Please sign in to comment.