sarahciston commited on
Commit
3af77c3
1 Parent(s): de353b9

update preprompt

Browse files
Files changed (1) hide show
  1. sketch.js +9 -9
sketch.js CHANGED
@@ -7,9 +7,10 @@ env.allowLocalModels = false;
7
 
8
  // GLOBAL VARIABLES
9
 
10
- var PREPROMPT = `Please continue the story, filling any [MASK] with your own words:`
 
11
  // let PREPROMPT = `Please complete the phrase and fill in any [MASK]: `
12
- var PROMPT_INPUT = `The [BLANK] has a job as a [MASK] but...` // a field for writing or changing a text value
13
  var promptField // an html element to hold the prompt
14
  var outText, outPics, outInfo // html elements to hold the results
15
  var blanksArray = [] // an empty list to store all the variables we enter to modify the prompt
@@ -154,16 +155,11 @@ new p5(function (p5){
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)
168
  f.class("blank")
169
  blanksArray.push(f)
@@ -176,7 +172,11 @@ new p5(function (p5){
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)
 
7
 
8
  // GLOBAL VARIABLES
9
 
10
+ var PREPROMPT = `Please continue the story after "..." and replace the "[MASK]" with your own words: `
11
+ // var PREPROMPT = `Please continue the story, filling in any [MASK] with your own words:`
12
  // let PREPROMPT = `Please complete the phrase and fill in any [MASK]: `
13
+ var PROMPT_INPUT = `` // a field for writing or changing a text value
14
  var promptField // an html element to hold the prompt
15
  var outText, outPics, outInfo // html elements to hold the results
16
  var blanksArray = [] // an empty list to store all the variables we enter to modify the prompt
 
155
  promptField.addClass("prompt")
156
 
157
 
 
 
 
 
158
  p5.createElement('h3', 'Fill in your blanks').class('header').parent(inputDiv)
159
  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)
160
  p5.createP('(e.g. doctor, secretary, circus performer)').parent(inputDiv)
161
 
162
+ function addField(){
 
163
  let f = p5.createInput("").parent(inputDiv)
164
  f.class("blank")
165
  blanksArray.push(f)
 
172
  // }
173
  }
174
 
175
+ addField()
176
+ addField()
177
+ addField()
178
+
179
+ // press to run model
180
  const submitButton = p5.createButton("RUN PROMPT")
181
  submitButton.size(170)
182
  submitButton.class('button').parent(inputDiv)