Skip to content

Commit

Permalink
Set pathOrIOHandler to IOHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Laco committed Aug 1, 2019
1 parent 697b0ad commit 6841bb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class NSFWJS {
public endpoints: string[]

private options: nsfwjsOptions
private pathOrIOHandler: string
private pathOrIOHandler: string | IOHandler
private model: tf.LayersModel
private intermediateModels: { [layerName: string]: tf.LayersModel } = {}

Expand All @@ -59,6 +59,7 @@ export class NSFWJS {
if (typeof modelPathBaseOrIOHandler === 'string') {
this.pathOrIOHandler = `${modelPathBaseOrIOHandler}model.json`
} else {
this.pathOrIOHandler = modelPathBaseOrIOHandler
}
}

Expand Down

0 comments on commit 6841bb7

Please sign in to comment.