Skip to content

Commit 6841bb7

Browse files
author
Morgan Laco
committed
Set pathOrIOHandler to IOHandler
1 parent 697b0ad commit 6841bb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class NSFWJS {
4343
public endpoints: string[]
4444

4545
private options: nsfwjsOptions
46-
private pathOrIOHandler: string
46+
private pathOrIOHandler: string | IOHandler
4747
private model: tf.LayersModel
4848
private intermediateModels: { [layerName: string]: tf.LayersModel } = {}
4949

@@ -59,6 +59,7 @@ export class NSFWJS {
5959
if (typeof modelPathBaseOrIOHandler === 'string') {
6060
this.pathOrIOHandler = `${modelPathBaseOrIOHandler}model.json`
6161
} else {
62+
this.pathOrIOHandler = modelPathBaseOrIOHandler
6263
}
6364
}
6465

0 commit comments

Comments
 (0)