We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 697b0ad commit 6841bb7Copy full SHA for 6841bb7
src/index.ts
@@ -43,7 +43,7 @@ export class NSFWJS {
43
public endpoints: string[]
44
45
private options: nsfwjsOptions
46
- private pathOrIOHandler: string
+ private pathOrIOHandler: string | IOHandler
47
private model: tf.LayersModel
48
private intermediateModels: { [layerName: string]: tf.LayersModel } = {}
49
@@ -59,6 +59,7 @@ export class NSFWJS {
59
if (typeof modelPathBaseOrIOHandler === 'string') {
60
this.pathOrIOHandler = `${modelPathBaseOrIOHandler}model.json`
61
} else {
62
+ this.pathOrIOHandler = modelPathBaseOrIOHandler
63
}
64
65
0 commit comments