Fix key_values and a typo

This commit is contained in:
Mohamed El-Geish 2020-07-31 22:00:26 -07:00
parent c8bff4345b
commit e55c956a94
2 changed files with 4 additions and 4 deletions

View File

@ -249,7 +249,7 @@ class HighlightedText(AbstractOutput):
if isinstance(prediction, str) or isinstance(prediction, int) or isinstance(prediction, float):
return str(prediction)
else:
raise ValueError("The `Textbox` output interface expects an output that is one of: a string, or"
raise ValueError("The `HighlightedText` output interface expects an output that is one of: a string, or"
"an int/float that can be converted to a string.")

View File

@ -11,10 +11,10 @@ const key_values = {
init: function(opts) {},
output: function(data) {
let html = ""
for (let row of data) {
for (const [key, value] of Object.entries(data)) {
html += `<tr>
<td>${row[0]}</td>
<td>${row[1]}</td>
<td>${key}</td>
<td>${value}</td>
</tr>`;
}
this.target.find("tbody").html(html);