Spaces:
Running
Running
connect interface to task results
Browse files
index.js
CHANGED
|
@@ -71,7 +71,6 @@ new p5(function (p5){
|
|
| 71 |
promptInput.attribute('label', `Write a text prompt with at least one [MASK] that the model will fill in.`)
|
| 72 |
p5.createP(promptInput.attribute('label'))
|
| 73 |
promptInput.addClass("prompt")
|
| 74 |
-
|
| 75 |
}
|
| 76 |
|
| 77 |
function makeButtons(){
|
|
@@ -80,8 +79,14 @@ new p5(function (p5){
|
|
| 80 |
submitButton.class('submit')
|
| 81 |
submitButton.mousePressed(getOutputs)
|
| 82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
-
}
|
| 85 |
|
| 86 |
|
| 87 |
|
|
|
|
| 71 |
promptInput.attribute('label', `Write a text prompt with at least one [MASK] that the model will fill in.`)
|
| 72 |
p5.createP(promptInput.attribute('label'))
|
| 73 |
promptInput.addClass("prompt")
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
function makeButtons(){
|
|
|
|
| 79 |
submitButton.class('submit')
|
| 80 |
submitButton.mousePressed(getOutputs)
|
| 81 |
}
|
| 82 |
+
|
| 83 |
+
function makeResultsText(){
|
| 84 |
+
let resultsText = p5.createElement('p',"Results:")
|
| 85 |
+
let res = await getOutputs(fillInTask())
|
| 86 |
+
resultsText.html(str(res))
|
| 87 |
+
}
|
| 88 |
|
| 89 |
+
});
|
| 90 |
|
| 91 |
|
| 92 |
|