Skip to content

Commit 4c74376

Browse files
authored
Merge pull request #2117 from mwalmsley/patch-1
Update hf_hub.mdx with new import, rename labels
2 parents 6ccb7d6 + 496ba54 commit 4c74376

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hfdocs/source/hf_hub.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Here is where you would normally train or fine-tune the model. We'll skip that f
3939
Let's pretend we've now fine-tuned the model. The next step would be to push it to the Hub! We can do this with the `timm.models.hub.push_to_hf_hub` function.
4040

4141
```py
42-
>>> model_cfg = dict(labels=['a', 'b', 'c', 'd'])
43-
>>> timm.models.hub.push_to_hf_hub(model, 'resnet18-random', model_config=model_cfg)
42+
>>> model_cfg = dict(label_names=['a', 'b', 'c', 'd'])
43+
>>> timm.models.push_to_hf_hub(model, 'resnet18-random', model_config=model_cfg)
4444
```
4545

4646
Running the above would push the model to `<your-username>/resnet18-random` on the Hub. You can now share this model with your friends, or use it in your own code!

0 commit comments

Comments
 (0)