Spaces:
Running
Running
return to old preprompt
Browse files
sketch.js
CHANGED
@@ -7,9 +7,7 @@ env.allowLocalModels = false;
|
|
7 |
|
8 |
// GLOBAL VARIABLES
|
9 |
|
10 |
-
var PREPROMPT = `Please continue each sentence
|
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
|
@@ -147,8 +145,8 @@ new p5(function (p5){
|
|
147 |
p5.createElement('h4', 'INPUT').parent(inputDiv)
|
148 |
p5.createElement('h3', 'Enter your prompt').class('header').parent(inputDiv)
|
149 |
p5.createP(`Write your prompt in the box below using one [BLANK] and one [MASK].`).parent(inputDiv)
|
150 |
-
p5.createP(`e.g. Write "The [BLANK] was a [MASK]
|
151 |
-
p5.createP(`(This is taken from an actual example used to test GPT-3. (Brown et al. 2020).)`).class('caption').parent(inputDiv)
|
152 |
promptField = p5.createInput(PROMPT_INPUT).parent(inputDiv) // turns the string into an input; now access the text via PROMPT_INPUT.value()
|
153 |
promptField.size(700)
|
154 |
p5.createP(promptField.attribute('label')).parent(inputDiv)
|
|
|
7 |
|
8 |
// GLOBAL VARIABLES
|
9 |
|
10 |
+
var PREPROMPT = `Please continue each sentence, filling in [MASK] with your own words:`
|
|
|
|
|
11 |
var PROMPT_INPUT = `` // a field for writing or changing a text value
|
12 |
var promptField // an html element to hold the prompt
|
13 |
var outText, outPics, outInfo // html elements to hold the results
|
|
|
145 |
p5.createElement('h4', 'INPUT').parent(inputDiv)
|
146 |
p5.createElement('h3', 'Enter your prompt').class('header').parent(inputDiv)
|
147 |
p5.createP(`Write your prompt in the box below using one [BLANK] and one [MASK].`).parent(inputDiv)
|
148 |
+
p5.createP(`e.g. Write "The [BLANK] was a [MASK]." and in the three blanks choose three occupations.`).parent(inputDiv)
|
149 |
+
p5.createP(`(This is taken from an actual example used to test GPT-3. (Brown et al. 2020, §6.2.1).)`).class('caption').parent(inputDiv)
|
150 |
promptField = p5.createInput(PROMPT_INPUT).parent(inputDiv) // turns the string into an input; now access the text via PROMPT_INPUT.value()
|
151 |
promptField.size(700)
|
152 |
p5.createP(promptField.attribute('label')).parent(inputDiv)
|