Spaces:
Running
Running
Update deberta.js
Browse files- deberta.js +2 -1
deberta.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
// Import the library
|
2 |
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
3 |
// Make it available globally
|
@@ -12,4 +13,4 @@ async function main() {
|
|
12 |
let out = await pipe('I love transformers!');
|
13 |
console.log(out);
|
14 |
}
|
15 |
-
//main()
|
|
|
1 |
+
// To demonstrate use of Javascript promise in Transformers.js pipeline API
|
2 |
// Import the library
|
3 |
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
4 |
// Make it available globally
|
|
|
13 |
let out = await pipe('I love transformers!');
|
14 |
console.log(out);
|
15 |
}
|
16 |
+
main(); // cannot manually call main() from a browser console. main() not defined error. Seems to be attributed to Huggingface's use of container
|