Module: Replicate::Client::Training

Included in:
Replicate::Client
Defined in:
lib/replicate/client/training.rb

Overview

Methods for the Prediction API

Instance Method Summary collapse

Instance Method Details

#create_training(params) ⇒ Object

Create a training



16
17
18
19
20
# File 'lib/replicate/client/training.rb', line 16

def create_training(params)
  params[:webhook_completed] ||= webhook_url
  response = dreambooth_endpoint.post("trainings", params)
  Replicate::Record::Training.new(self, response)
end

#retrieve_training(id) ⇒ Object

Get a training



9
10
11
12
# File 'lib/replicate/client/training.rb', line 9

def retrieve_training(id)
  response = dreambooth_endpoint.get("trainings/#{id}")
  Replicate::Record::Training.new(self, response)
end