sarahciston commited on
Commit
3960a3b
1 Parent(s): c50aba2

map values of blanks array, rerun model

Browse files
Files changed (1) hide show
  1. sketch.js +12 -10
sketch.js CHANGED
@@ -188,22 +188,24 @@ new p5(function (p5){
188
  console.log("latest prompt: ", PROMPT_INPUT)
189
 
190
  // let blanksValues = blanksArray.map(({value}) => value)
191
- let blanksValues = []
192
- blanksArray.forEach(b => {
193
- blanksValues.push(b.value())
194
- })
 
 
195
  console.log(blanksValues)
196
 
197
  // blanksArray.forEach(b => console.log(b.value()))
198
 
199
- // // call the function that runs the model for the task of your choice here
200
- // // make sure to use the PROMPT_INPUT as a parameter, or also the PREPROMPT if valid for that task
201
 
202
- // // let outs = await textGenTask(PREPROMPT, PROMPT_INPUT, blanksArray)
203
- // console.log(outs)
204
 
205
- // // insert the model outputs into the paragraph
206
- // await outText.html(outs, false) // false replaces text instead of appends
207
  }
208
 
209
  function addField(){
 
188
  console.log("latest prompt: ", PROMPT_INPUT)
189
 
190
  // let blanksValues = blanksArray.map(({value}) => value)
191
+ // let blanksValues = []
192
+ // blanksArray.forEach(b => {
193
+ // blanksValues.push(b.value())
194
+ // })
195
+
196
+ let blanksValues = blanksArray.map(b => b.value())
197
  console.log(blanksValues)
198
 
199
  // blanksArray.forEach(b => console.log(b.value()))
200
 
201
+ // call the function that runs the model for the task of your choice here
202
+ // make sure to use the PROMPT_INPUT as a parameter, or also the PREPROMPT if valid for that task
203
 
204
+ let outs = await textGenTask(PREPROMPT, PROMPT_INPUT, blanksValues)
205
+ console.log(outs)
206
 
207
+ // insert the model outputs into the paragraph
208
+ await outText.html(outs, false) // false replaces text instead of appends
209
  }
210
 
211
  function addField(){