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

Update deberta.js

Browse files
Files changed (1) hide show
  1. deberta.js +4 -1
deberta.js CHANGED
@@ -1,7 +1,10 @@
 
 
 
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() {
 
1
+ // Import the library
2
+ import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.5.4';
3
+ // Make it available globally
4
  window.pipeline = pipeline;
5
 
6
  async function makepipe() {
7
+ return await pipeline('sentiment-analysis');
8
  }
9
 
10
  async function main() {