Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def handle_classify(image=None):
|
|
27 |
|
28 |
result = results[0]
|
29 |
|
30 |
-
top5 = [[result.names[class_index], result.probs.top5conf.tolist()[rank]]
|
31 |
for class_index, rank in zip(result.probs.top5, range(5))]
|
32 |
|
33 |
print(top5)
|
|
|
27 |
|
28 |
result = results[0]
|
29 |
|
30 |
+
top5 = [[result.names[class_index], str(round(result.probs.top5conf.tolist()[rank], 4)*100)+'%']
|
31 |
for class_index, rank in zip(result.probs.top5, range(5))]
|
32 |
|
33 |
print(top5)
|