Class: Clarification::Train

Inherits:
Object
  • Object
show all
Defined in:
lib/clarification/train.rb

Instance Method Summary collapse

Instance Method Details

#add_image(image, concept_array) ⇒ Object


4
5
6
7
8
# File 'lib/clarification/train.rb', line 4

def add_image(image, concept_array)
  training_requester = TrainRequester.new
  response = training_requester.add_image_with_concepts(image, concept_array)
  return response # will be mostly status
end

#create_model(name, concept_array) ⇒ Object


10
11
12
13
14
# File 'lib/clarification/train.rb', line 10

def create_model(name, concept_array)
  training_requester = TrainRequester.new
  response = training_requester.create_model(name, concept_array)
  TrainResponse.new(response).create_model
end

#train_model(model) ⇒ Object


16
17
18
19
20
# File 'lib/clarification/train.rb', line 16

def train_model(model)
  training_requester = TrainRequester.new
  response = training_requester.train_model(model.id)
  TrainResponse.new(response).train_model
end