Skip to content

Commit d61eaaa

Browse files
authored
Update worker.js
Added: // Ensures models are fetched from Hugging Face Hub, not from your GitHub Pages /models directory env.localModelPath = null; env.remoteModelsPath = 'https://huggingface.co/';
1 parent 7a7202c commit d61eaaa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

worker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.2/dist/transformers.min.js';
22

3+
// Ensures models are fetched from Hugging Face Hub, not from your GitHub Pages /models directory
4+
env.localModelPath = null;
5+
env.remoteModelsPath = 'https://huggingface.co/';
6+
37
let pipe = null;
48
let pipelineTask = 'image-to-text';
59

0 commit comments

Comments
 (0)