Skip to content

Commit 3f344ec

Browse files
zekeevilstreak
authored andcommitted
fix usage for pinned versions
Signed-off-by: Zeke Sikelianos <[email protected]>
1 parent eab33e8 commit 3f344ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ You can cancel a running prediction:
9797
'canceled'
9898
```
9999

100-
By default, `model.predict()` uses the latest version. If you want to pin to a particular version, you can get a version with its ID:
100+
By default, `model.predict()` uses the latest version. If you want to pin to a particular version, you can get a version with its ID, then call the `predict()` method on that version:
101101

102102
```
103103
>>> model = replicate.models.get("replicate/hello-world")
104104
>>> version = model.versions.get("5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa")
105-
>>> model.predict(text="python")
105+
>>> version.predict(text="python")
106106
"hello python"
107107
```
108108

0 commit comments

Comments
 (0)