boazchung commited on
Commit
9b62581
1 Parent(s): d316d90

Update deberta.js

Browse files
Files changed (1) hide show
  1. deberta.js +2 -3
deberta.js CHANGED
@@ -1,7 +1,7 @@
 
1
 
2
  async function makepipe() {
3
- //return await pipeline('sentiment-analysis');
4
- return await window.pipeline('sentiment-analysis');
5
  }
6
 
7
  async function main() {
@@ -9,5 +9,4 @@ async function main() {
9
  let out = await pipe('I love transformers!');
10
  console.log(out);
11
  }
12
-
13
  main();
 
1
+ window.pipeline = pipeline;
2
 
3
  async function makepipe() {
4
+ return await pipeline('sentiment-analysis'); // ReferenceError here because pipeline is not defined
 
5
  }
6
 
7
  async function main() {
 
9
  let out = await pipe('I love transformers!');
10
  console.log(out);
11
  }
 
12
  main();