Skip to content

Commit 3c1322f

Browse files
committed
Add license to callCallback, return this from ImageClassifier#loadModel
1 parent 634122a commit 3c1322f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/ImageClassifier/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class ImageClassifier {
3838

3939
async loadModel() {
4040
this.model = await this.modelToUse.load(this.version, this.alpha);
41+
return this;
4142
}
4243

4344
async predictInternal(imgToPredict, numberOfClasses) {

src/utils/callcallback.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// Copyright (c) 2018 ml5
2+
//
3+
// This software is released under the MIT License.
4+
// https://opensource.org/licenses/MIT
5+
16
export default function callCallback(promise, callback) {
27
return callback ? promise.then((result) => {
38
callback(undefined, result);

0 commit comments

Comments
 (0)