mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-09 02:00:44 +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):
|
||||
if isinstance(prediction, str):
|
||||
return {"label": str}
|
||||
return {"label": prediction}
|
||||
elif isinstance(prediction, dict):
|
||||
sorted_pred = sorted(
|
||||
prediction.items(),
|
||||
|
Loading…
Reference in New Issue
Block a user