Update index.js
Browse files
index.js
CHANGED
@@ -14,6 +14,11 @@ const EXAMPLE_URL = 'https://huggingface.co/datasets/Xenova/transformers.js-docs
|
|
14 |
// Create a new object detection pipeline
|
15 |
status.textContent = 'Loading model...';
|
16 |
const detector = await pipeline('feature-extraction','Xenova/colbertv2.0');
|
|
|
|
|
|
|
|
|
|
|
17 |
status.textContent = 'Ready';
|
18 |
|
19 |
example.addEventListener('click', (e) => {
|
|
|
14 |
// Create a new object detection pipeline
|
15 |
status.textContent = 'Loading model...';
|
16 |
const detector = await pipeline('feature-extraction','Xenova/colbertv2.0');
|
17 |
+
|
18 |
+
const output = await detector('This is a simple test.');
|
19 |
+
|
20 |
+
console.log(output);
|
21 |
+
|
22 |
status.textContent = 'Ready';
|
23 |
|
24 |
example.addEventListener('click', (e) => {
|