You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: replicate/model.py
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,35 @@
7
7
8
8
9
9
classModel(BaseModel):
10
+
"""
11
+
A machine learning model hosted on Replicate.
12
+
"""
13
+
10
14
username: str
15
+
"""
16
+
The name of the user or organization that owns the model.
17
+
"""
18
+
11
19
name: str
20
+
"""
21
+
The name of the model.
22
+
"""
12
23
13
24
defpredict(self, *args, **kwargs) ->None:
25
+
"""
26
+
DEPRECATED: Use `version.predict()` instead.
27
+
"""
28
+
14
29
raiseReplicateException(
15
30
"The `model.predict()` method has been removed, because it's unstable: if a new version of the model you're using is pushed and its API has changed, your code may break. Use `version.predict()` instead. See https://github.com/replicate/replicate-python#readme"
Create a new training using the specified model version as a base.
113
+
114
+
Args:
115
+
version: The ID of the base model version that you're using to train a new model version.
116
+
input: The input to the training.
117
+
destination: The desired model to push to in the format `{owner}/{model_name}`. This should be an existing model owned by the user or organization making the API request.
118
+
webhook: The URL to send a POST request to when the training is completed. Defaults to None.
119
+
webhook_events_filter: The events to send to the webhook. Defaults to None.
0 commit comments