We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1afa98 commit 518437bCopy full SHA for 518437b
README.md
@@ -69,6 +69,24 @@ iteration: 30, render:loss: -1.3994140625
69
'https://.../output.png'
70
```
71
72
+You can cancel a running prediction:
73
+
74
+```python
75
+>>> model = replicate.models.get("kvfrans/clipdraw")
76
+>>> prediction = replicate.predictions.create(
77
+... version=model.versions.list()[0],
78
+... input={"prompt":"Watercolor painting of an underwater submarine"})
79
80
+>>> prediction.status
81
+'starting'
82
83
+>>> prediction.cancel()
84
85
+>>> prediction.reload()
86
87
+'canceled'
88
+```
89
90
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:
91
92
0 commit comments