Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ iteration: 30, render:loss: -1.3994140625
'https://.../output.png'
```

You can cancel a running prediction:

```python
>>> model = replicate.models.get("kvfrans/clipdraw")
>>> prediction = replicate.predictions.create(
... version=model.versions.list()[0],
... input={"prompt":"Watercolor painting of an underwater submarine"})

>>> prediction.status
'starting'

>>> prediction.cancel()

>>> prediction.reload()
>>> prediction.status
'canceled'
```

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:

```
Expand Down