Spaces:
Running
Running
update fields inputs
Browse files
sketch.js
CHANGED
|
@@ -138,8 +138,8 @@ new p5(function (p5){
|
|
| 138 |
}
|
| 139 |
|
| 140 |
function makeTextDisplay(){
|
| 141 |
-
|
| 142 |
-
|
| 143 |
p5.createP(`Use it to explore what models 'know' about various concepts, communities, and cultures. For more information on prompt programming and critical AI, see [Tutorial & extra info][TO-DO][XXX]`)
|
| 144 |
}
|
| 145 |
|
|
@@ -150,7 +150,7 @@ new p5(function (p5){
|
|
| 150 |
p5.createP(pField.attribute('label'))
|
| 151 |
pField.addClass("prompt")
|
| 152 |
|
| 153 |
-
fieldsDiv = p5.createDiv()
|
| 154 |
fieldsDiv.id('fieldsDiv')
|
| 155 |
|
| 156 |
addField()
|
|
@@ -173,13 +173,13 @@ new p5(function (p5){
|
|
| 173 |
}
|
| 174 |
|
| 175 |
function makeButtons(){
|
| 176 |
-
|
| 177 |
submitButton.size(170)
|
| 178 |
submitButton.class('submit')
|
| 179 |
submitButton.mousePressed(displayResults)
|
| 180 |
|
| 181 |
// also make results placeholder
|
| 182 |
-
|
| 183 |
outText = p5.createP('').id('results')
|
| 184 |
}
|
| 185 |
|
|
|
|
| 138 |
}
|
| 139 |
|
| 140 |
function makeTextDisplay(){
|
| 141 |
+
const title = p5.createElement('h1','p5.js Critical AI Prompt Battle')
|
| 142 |
+
const intro = p5.createP(`This tool lets you explore several AI prompts results at once.`)
|
| 143 |
p5.createP(`Use it to explore what models 'know' about various concepts, communities, and cultures. For more information on prompt programming and critical AI, see [Tutorial & extra info][TO-DO][XXX]`)
|
| 144 |
}
|
| 145 |
|
|
|
|
| 150 |
p5.createP(pField.attribute('label'))
|
| 151 |
pField.addClass("prompt")
|
| 152 |
|
| 153 |
+
const fieldsDiv = p5.createDiv()
|
| 154 |
fieldsDiv.id('fieldsDiv')
|
| 155 |
|
| 156 |
addField()
|
|
|
|
| 173 |
}
|
| 174 |
|
| 175 |
function makeButtons(){
|
| 176 |
+
const submitButton = p5.createButton("SUBMIT")
|
| 177 |
submitButton.size(170)
|
| 178 |
submitButton.class('submit')
|
| 179 |
submitButton.mousePressed(displayResults)
|
| 180 |
|
| 181 |
// also make results placeholder
|
| 182 |
+
const outHeader = p5.createElement('h3',"Results")
|
| 183 |
outText = p5.createP('').id('results')
|
| 184 |
}
|
| 185 |
|