#591 更新 'tips/modelDown/sdkcode_en.md'

Merged
chenzh merged 1 commits from chenzh-patch-13 into master 3 weeks ago
  1. +8
    -11
      tips/modelDown/sdkcode_en.md

+ 8
- 11
tips/modelDown/sdkcode_en.md View File

@@ -1,21 +1,18 @@
## Download the OpenI model to the local folder:
*Use SDK to download model files larger than 500MB*
### **model.download_model(repo_id, model_name)**
*Use SDK for download when the model file is larger than 500MB, and modify the parameters in the following code according to the specific **repository path**, **model name**, and **local saving path**.*

+ repo_id str, **Required** repository ID owner/warehouse name, such as https://openi.pcl.ac.cn/OpenI/aiforge The ID of is OpenI/aiforge
+ model_name str, **Required**:The model name displayed on the webpage
+ save_path str, **Required**,defaults to the model folder under the current path: local save path. If it does not exist, it will be automatically created

#### Code usage
#### Using Python Code Download
```python
import openi
openi.model.download_model("user1/repo1", "online_model_1","save_local_model/")
openi.model.download_model("username/repository", "model_name", "local_save_path")
```

#### shell usage
#### Using Command-Line Download
```bash
openi model download -r user1/repo1 -m online_model_1 -p save_local_model/
openi model download -r username/repository_name -m model_name -p local_save_path
```


For more information on usage, please refer to the<a target="_blank" href="https://openi.pcl.ac.cn/docs/index.html#/api/models/download_model"> Use Help.</a>
For installation and usage instructions of the `openi` library, please refer to the<a target="_blank" href="https://openi.pcl.ac.cn/docs/index.html#/api/models/download_model"> Use Help.</a>



Loading…
Cancel
Save