File size: 302 Bytes
9b62581 f5fd590 521f9a6 9b62581 521f9a6 fde6c75 |
1 2 3 4 5 6 7 8 9 10 11 12 |
window.pipeline = pipeline;
async function makepipe() {
return await pipeline('sentiment-analysis'); // ReferenceError here because pipeline is not defined
}
async function main() {
let pipe = await makepipe();
let out = await pipe('I love transformers!');
console.log(out);
}
main(); |