Skip to content

Instantly share code, notes, and snippets.

@sgl0v
Created June 2, 2021 19:19
Show Gist options
  • Save sgl0v/b53d00e79c760709e13b8c24d722eb9e to your computer and use it in GitHub Desktop.
Save sgl0v/b53d00e79c760709e13b8c24d722eb9e to your computer and use it in GitHub Desktop.
/// Class for model loading and prediction
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
class coremlColorizer {
/**
Make a prediction using the structured interface
- parameters:
- input: the input to the prediction as coremlColorizerInput
- throws: an NSError object that describes the problem
- returns: the result of the prediction as coremlColorizerOutput
*/
func prediction(input: coremlColorizerInput) throws -> coremlColorizerOutput {
return try self.prediction(input: input, options: MLPredictionOptions())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment