Skip to content

Commit

Permalink
update readme for second config option
Browse files Browse the repository at this point in the history
  • Loading branch information
GantMan authored May 2, 2019
1 parent b21e6ff commit 58d57b8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,21 @@ nsfwjs.load().then(function(model) {

#### `load` the model

Before you can classify any image, you'll need to load the model. You should use the optional parameter and load the model from your website, as explained in the install directions.
Before you can classify any image, you'll need to load the model. You should use the optional first parameter and load the model from your website, as explained in the install directions.

```js
const model = nsfwjs.load('/path/to/model/directory/')
```

If you're using a model that needs an image of dimension other than 224x224, you can pass the size in the options parameter.
```js
const model = nsfwjs.load('/path/to/different/model/', {size: 299})
```

**Parameters**

- optional URL to the `model.json`
- optional URL to the `model.json` folder.
- optional object with size property that your model expects.

**Returns**

Expand Down

0 comments on commit 58d57b8

Please sign in to comment.