Spaces:
Sleeping
Sleeping
Delete deberta.js
Browse files- deberta.js +0 -16
deberta.js
DELETED
@@ -1,16 +0,0 @@
|
|
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
|
5 |
-
window.pipeline = pipeline;
|
6 |
-
|
7 |
-
async function makepipe() {
|
8 |
-
return await pipeline('sentiment-analysis');
|
9 |
-
}
|
10 |
-
|
11 |
-
async function main() {
|
12 |
-
let pipe = await makepipe();
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|