Spaces:
Running
Running
sarahciston
commited on
Commit
•
22a8a4d
1
Parent(s):
8c26bf2
try mapping to new array at button push
Browse files
sketch.js
CHANGED
@@ -165,7 +165,10 @@ new p5(function (p5){
|
|
165 |
f.class("blank")
|
166 |
f.parent("#fieldsDiv")
|
167 |
|
168 |
-
|
|
|
|
|
|
|
169 |
console.log("made field")
|
170 |
|
171 |
// Cap the number of fields, avoids token limit in prompt
|
@@ -203,8 +206,10 @@ new p5(function (p5){
|
|
203 |
PROMPT_INPUT = pField.value() // grab update to the prompt if it's been changed
|
204 |
console.log("latest prompt: ", PROMPT_INPUT)
|
205 |
|
206 |
-
|
207 |
-
|
|
|
|
|
208 |
|
209 |
// // call the function that runs the model for the task of your choice here
|
210 |
// // make sure to use the PROMPT_INPUT as a parameter, or also the PREPROMPT if valid for that task
|
|
|
165 |
f.class("blank")
|
166 |
f.parent("#fieldsDiv")
|
167 |
|
168 |
+
// f.changed()
|
169 |
+
// f.input(blanksArray.push(f))
|
170 |
+
blanksArray.add(f)
|
171 |
+
// blanksArray.push(f)
|
172 |
console.log("made field")
|
173 |
|
174 |
// Cap the number of fields, avoids token limit in prompt
|
|
|
206 |
PROMPT_INPUT = pField.value() // grab update to the prompt if it's been changed
|
207 |
console.log("latest prompt: ", PROMPT_INPUT)
|
208 |
|
209 |
+
let blanksValues = blanksArray.map(({value}) => value)
|
210 |
+
console.log(blanksValues)
|
211 |
+
|
212 |
+
// blanksArray.forEach(b => console.log(b.value()))
|
213 |
|
214 |
// // call the function that runs the model for the task of your choice here
|
215 |
// // make sure to use the PROMPT_INPUT as a parameter, or also the PREPROMPT if valid for that task
|