Spaces:
Running
Running
Update deberta.js
Browse files- deberta.js +2 -3
deberta.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
|
|
| 1 |
|
| 2 |
async function makepipe() {
|
| 3 |
-
|
| 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();
|