diff --git a/gradio/outputs.py b/gradio/outputs.py index 691b177503..4cf30eafab 100644 --- a/gradio/outputs.py +++ b/gradio/outputs.py @@ -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.") diff --git a/gradio/static/js/interfaces/output/key_values.js b/gradio/static/js/interfaces/output/key_values.js index 9e6ce98fd8..844b27f440 100644 --- a/gradio/static/js/interfaces/output/key_values.js +++ b/gradio/static/js/interfaces/output/key_values.js @@ -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 += ` - ${row[0]} - ${row[1]} + ${key} + ${value} `; } this.target.find("tbody").html(html);