Moon-bow commited on
Commit
b5c086f
·
verified ·
1 Parent(s): 062a633

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -47,7 +47,7 @@ For the full implementation and instructions, please see our official GitHub rep
47
 
48
  To use the pretrained models from this hub, you can use the `huggingface_hub` library to download the files into the correct directory structure within your local `pretrained_models` folder.
49
 
50
- **Example: Download All Models (Terminal Command)**
51
 
52
  Make sure you have `huggingface-hub` installed (`pip install huggingface-hub`). Then run the following command from your terminal:
53
 
@@ -57,6 +57,20 @@ huggingface-cli download Moon-bow/DPoser-X --repo-type model --local-dir pretrai
57
 
58
  This command will download the entire repository contents into a local folder named `pretrained_models`, preserving the required directory structure. You can then proceed with the instructions in our GitHub repository.
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  ## Citation
61
  If you find our work useful, please cite our paper:
62
 
 
47
 
48
  To use the pretrained models from this hub, you can use the `huggingface_hub` library to download the files into the correct directory structure within your local `pretrained_models` folder.
49
 
50
+ **Example: Using the Terminal (Downloads all models at once)**
51
 
52
  Make sure you have `huggingface-hub` installed (`pip install huggingface-hub`). Then run the following command from your terminal:
53
 
 
57
 
58
  This command will download the entire repository contents into a local folder named `pretrained_models`, preserving the required directory structure. You can then proceed with the instructions in our GitHub repository.
59
 
60
+ **Example: Within Python Code (Automatic Download)**
61
+
62
+ You can also use the `huggingface_hub` library to download the models programmatically:
63
+
64
+ ```python
65
+ from huggingface_hub import snapshot_download, hf_hub_download
66
+
67
+ # download entire repo
68
+ filepath = snapshot_download(repo_id="Moon-bow/DPoser-X")
69
+
70
+ # download one file
71
+ filepath = hf_hub_download(repo_id="Moon-bow/DPoser-X", filename="body/BaseMLP/last.ckpt")
72
+ ```
73
+
74
  ## Citation
75
  If you find our work useful, please cite our paper:
76