Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,7 +89,7 @@ def predict(image: PIL.Image.Image, score_threshold: float,
|
|
| 89 |
res[label] = prob
|
| 90 |
b = dict(sorted(res.items(),key=lambda item:item[1], reverse=True))
|
| 91 |
a = ', '.join(list(b.keys())).replace('_',' ')
|
| 92 |
-
return a
|
| 93 |
|
| 94 |
|
| 95 |
def main():
|
|
@@ -112,7 +112,7 @@ def main():
|
|
| 112 |
default=args.score_threshold,
|
| 113 |
label='Score Threshold'),
|
| 114 |
],
|
| 115 |
-
gr.outputs.
|
| 116 |
title=TITLE,
|
| 117 |
description=DESCRIPTION,
|
| 118 |
theme=args.theme,
|
|
|
|
| 89 |
res[label] = prob
|
| 90 |
b = dict(sorted(res.items(),key=lambda item:item[1], reverse=True))
|
| 91 |
a = ', '.join(list(b.keys())).replace('_',' ')
|
| 92 |
+
return (a,res)
|
| 93 |
|
| 94 |
|
| 95 |
def main():
|
|
|
|
| 112 |
default=args.score_threshold,
|
| 113 |
label='Score Threshold'),
|
| 114 |
],
|
| 115 |
+
['text', gr.outputs.Label(label=Output)],
|
| 116 |
title=TITLE,
|
| 117 |
description=DESCRIPTION,
|
| 118 |
theme=args.theme,
|