Spaces:
Running
Running
insert html text from output list
Browse files
index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers
|
|
| 6 |
env.allowLocalModels = false;
|
| 7 |
|
| 8 |
// GLOBAL VARIABLES
|
| 9 |
-
let PROMPT_INPUT = `Happy people don't [MASK]
|
| 10 |
let OUTPUT_LIST = [] // a blank array to store the results from the model
|
| 11 |
let pField
|
| 12 |
|
|
@@ -101,9 +101,9 @@ new p5(function (p5){
|
|
| 101 |
console.log(outs)
|
| 102 |
|
| 103 |
// text = str(outs)
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
}
|
| 108 |
|
| 109 |
// async function makeOutputDisplay(){
|
|
|
|
| 6 |
env.allowLocalModels = false;
|
| 7 |
|
| 8 |
// GLOBAL VARIABLES
|
| 9 |
+
let PROMPT_INPUT = `Happy people don't go [MASK].` // a field for writing or changing a text value
|
| 10 |
let OUTPUT_LIST = [] // a blank array to store the results from the model
|
| 11 |
let pField
|
| 12 |
|
|
|
|
| 101 |
console.log(outs)
|
| 102 |
|
| 103 |
// text = str(outs)
|
| 104 |
+
let outHeader = p5.createElement('h3',"Results")
|
| 105 |
+
let outText = p5.createP('')
|
| 106 |
+
await outText.html(outs)
|
| 107 |
}
|
| 108 |
|
| 109 |
// async function makeOutputDisplay(){
|