Spaces:
Running
Running
sarahciston
commited on
Commit
•
8448a0a
1
Parent(s):
02779b8
try iterating over output after call
Browse files
index.js
CHANGED
@@ -62,9 +62,8 @@ new p5(function (p5){
|
|
62 |
}
|
63 |
|
64 |
function makeDisplayText(){
|
65 |
-
let title = p5.createElement('h1','Critical AI Prompt Battle')
|
66 |
-
let
|
67 |
-
let caption = p5.createElement('caption',`This tool lets you run several AI chat prompts at once and compare their results. Use it to explore what models 'know' about various concepts, communities, and cultures. For more information on prompt programming and critical AI, see [Tutorial & extra info][TO-DO][XXX]`)
|
68 |
}
|
69 |
|
70 |
function makeFields(){
|
@@ -82,12 +81,17 @@ new p5(function (p5){
|
|
82 |
submitButton.mousePressed(makeResultsText)
|
83 |
}
|
84 |
|
85 |
-
|
86 |
-
function makeResultsText(){
|
87 |
console.log('button pressed')
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
93 |
});
|
|
|
62 |
}
|
63 |
|
64 |
function makeDisplayText(){
|
65 |
+
let title = p5.createElement('h1','p5.js Critical AI Prompt Battle')
|
66 |
+
let intro = p5.createP(`This tool lets you run several AI chat prompts at once and compare their results. Use it to explore what models 'know' about various concepts, communities, and cultures. For more information on prompt programming and critical AI, see [Tutorial & extra info][TO-DO][XXX]`)
|
|
|
67 |
}
|
68 |
|
69 |
function makeFields(){
|
|
|
81 |
submitButton.mousePressed(makeResultsText)
|
82 |
}
|
83 |
|
84 |
+
async function makeResultsText(){
|
|
|
85 |
console.log('button pressed')
|
86 |
+
let resultsText = p5.createElement('h4',"Results:")
|
87 |
+
|
88 |
+
let out = await getOutputs(fillInTask())
|
89 |
+
console.log(out)
|
90 |
+
|
91 |
+
// iterate over OUTPUT_LIST or other results, add to HTML displayed
|
92 |
+
out.forEach(o => {
|
93 |
+
resultsText.html(o)
|
94 |
+
})
|
95 |
}
|
96 |
|
97 |
});
|