Update README.md
Browse files
README.md
CHANGED
@@ -71,6 +71,9 @@ Usage with Transformers.js
|
|
71 |
```js
|
72 |
import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
73 |
|
|
|
|
|
|
|
74 |
// Load the image classification model
|
75 |
const classifier = await pipeline('image-classification', 'AdamCodd/vit-base-nsfw-detector');
|
76 |
|
|
|
71 |
```js
|
72 |
import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
73 |
|
74 |
+
// Since we will download the model from the Hugging Face Hub, we can skip the local model check
|
75 |
+
env.allowLocalModels = false;
|
76 |
+
|
77 |
// Load the image classification model
|
78 |
const classifier = await pipeline('image-classification', 'AdamCodd/vit-base-nsfw-detector');
|
79 |
|