mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-01 11:45:36 +08:00
str label fix
This commit is contained in:
parent
8cf88d5079
commit
578619a64d
@ -49,7 +49,7 @@ class Label(AbstractOutput):
|
|||||||
|
|
||||||
def postprocess(self, prediction):
|
def postprocess(self, prediction):
|
||||||
if isinstance(prediction, str):
|
if isinstance(prediction, str):
|
||||||
return {"label": str}
|
return {"label": prediction}
|
||||||
elif isinstance(prediction, dict):
|
elif isinstance(prediction, dict):
|
||||||
sorted_pred = sorted(
|
sorted_pred = sorted(
|
||||||
prediction.items(),
|
prediction.items(),
|
||||||
|
Loading…
Reference in New Issue
Block a user