Spaces:
Running
Running
sarahciston
commited on
Commit
•
1765b74
1
Parent(s):
b397845
move add fields as test
Browse files
sketch.js
CHANGED
@@ -135,7 +135,7 @@ new p5(function (p5){
|
|
135 |
p5.createP(`What do AI models really 'know' about you — about your community, your language, your culture? What do they 'know' about different concepts, ideas, and worldviews?`).parent(introDiv)
|
136 |
p5.createP(`This tool lets you compare the results of multiple AI-generated texts and images side-by-side, using blanks you fill in to explore variations on a single prompt. For more info on prompt programming and critical AI, see <A href="">[TUTORIAL-LINK]</a>.`).parent(introDiv)
|
137 |
|
138 |
-
|
139 |
p5.createElement('h4', 'INSTRUCTIONS').class('header').parent(introDiv)
|
140 |
p5.createP(`Write your prompt using [BLANK] and [MASK], where [BLANK] will be the variation you choose and fill in below, and [MASK] is a variation that the model will complete.`).parent(introDiv)
|
141 |
p5.createP(`For best results, try to phrase your prompt so that [BLANK] and [MASK] highlight the qualities you want to investigate. See <A href="">[EXAMPLES]</a>`).parent(introDiv)
|
@@ -153,13 +153,15 @@ new p5(function (p5){
|
|
153 |
p5.createP(promptField.attribute('label')).parent(inputDiv)
|
154 |
promptField.addClass("prompt")
|
155 |
|
|
|
|
|
|
|
|
|
|
|
156 |
p5.createElement('h3', 'Fill in your blanks').class('header').parent(inputDiv)
|
157 |
p5.createP('Add three words or phrases in the boxes below that will replace the [BLANK] in your prompt when the model runs.').parent(inputDiv)
|
158 |
p5.createP('(e.g. doctor, secretary, circus performer)').parent(inputDiv)
|
159 |
|
160 |
-
addField()
|
161 |
-
addField()
|
162 |
-
addField()
|
163 |
|
164 |
function addField(){
|
165 |
let f = p5.createInput("").parent(inputDiv)
|
@@ -172,13 +174,15 @@ new p5(function (p5){
|
|
172 |
// console.log(blanks.length)
|
173 |
// addButton.style('visibility','hidden')
|
174 |
// }
|
175 |
-
|
176 |
|
177 |
// press to run model
|
178 |
const submitButton = p5.createButton("RUN PROMPT")
|
179 |
submitButton.size(170)
|
180 |
submitButton.class('button').parent(inputDiv)
|
181 |
submitButton.mousePressed(displayOutput)
|
|
|
|
|
182 |
}
|
183 |
|
184 |
|
|
|
135 |
p5.createP(`What do AI models really 'know' about you — about your community, your language, your culture? What do they 'know' about different concepts, ideas, and worldviews?`).parent(introDiv)
|
136 |
p5.createP(`This tool lets you compare the results of multiple AI-generated texts and images side-by-side, using blanks you fill in to explore variations on a single prompt. For more info on prompt programming and critical AI, see <A href="">[TUTORIAL-LINK]</a>.`).parent(introDiv)
|
137 |
|
138 |
+
const instructDiv = p5.createDiv().id('instructions').parent(introDiv)
|
139 |
p5.createElement('h4', 'INSTRUCTIONS').class('header').parent(introDiv)
|
140 |
p5.createP(`Write your prompt using [BLANK] and [MASK], where [BLANK] will be the variation you choose and fill in below, and [MASK] is a variation that the model will complete.`).parent(introDiv)
|
141 |
p5.createP(`For best results, try to phrase your prompt so that [BLANK] and [MASK] highlight the qualities you want to investigate. See <A href="">[EXAMPLES]</a>`).parent(introDiv)
|
|
|
153 |
p5.createP(promptField.attribute('label')).parent(inputDiv)
|
154 |
promptField.addClass("prompt")
|
155 |
|
156 |
+
|
157 |
+
addField()
|
158 |
+
addField()
|
159 |
+
addField()
|
160 |
+
|
161 |
p5.createElement('h3', 'Fill in your blanks').class('header').parent(inputDiv)
|
162 |
p5.createP('Add three words or phrases in the boxes below that will replace the [BLANK] in your prompt when the model runs.').parent(inputDiv)
|
163 |
p5.createP('(e.g. doctor, secretary, circus performer)').parent(inputDiv)
|
164 |
|
|
|
|
|
|
|
165 |
|
166 |
function addField(){
|
167 |
let f = p5.createInput("").parent(inputDiv)
|
|
|
174 |
// console.log(blanks.length)
|
175 |
// addButton.style('visibility','hidden')
|
176 |
// }
|
177 |
+
}
|
178 |
|
179 |
// press to run model
|
180 |
const submitButton = p5.createButton("RUN PROMPT")
|
181 |
submitButton.size(170)
|
182 |
submitButton.class('button').parent(inputDiv)
|
183 |
submitButton.mousePressed(displayOutput)
|
184 |
+
|
185 |
+
|
186 |
}
|
187 |
|
188 |
|