Skip to content

Commit

Permalink
workaround circular import
Browse files Browse the repository at this point in the history
Signed-off-by: dan nelson <dan.nelson8@gmail.com>
  • Loading branch information
daanelson committed Mar 2, 2023
1 parent cba41fe commit 6cce2ec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions replicate/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
from replicate.base_model import BaseModel
from replicate.collection import Collection
from replicate.exceptions import ModelError
from replicate.prediction import Prediction
from replicate.schema import make_schema_backwards_compatible


class Version(BaseModel):
id: str
created_at: datetime.datetime
Expand All @@ -32,7 +30,7 @@ def predict(self, **kwargs) -> Union[Any, Iterator[Any]]:
raise ModelError(prediction.error)
return prediction.output

def create_prediction(self, **kwargs) -> Prediction:
def create_prediction(self, **kwargs) -> 'Prediction':
"""Creates and immediately returns a prediction"""
return self._client.predictions.create(version=self, input=kwargs)

Expand Down

0 comments on commit 6cce2ec

Please sign in to comment.