Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def detect(image):
|
|
40 |
counts[label_name] = 0
|
41 |
counts[label_name] += 1
|
42 |
|
43 |
-
count_results = {k: v for k, v in (sorted(counts.items(), key=lambda item: item[1])[:10])}
|
44 |
label2color = {}
|
45 |
for idx, label in enumerate(count_results):
|
46 |
label2color[label] = colors[idx]
|
|
|
40 |
counts[label_name] = 0
|
41 |
counts[label_name] += 1
|
42 |
|
43 |
+
count_results = {k: v for k, v in (sorted(counts.items(), key=lambda item: item[1], reverse=True)[:10])}
|
44 |
label2color = {}
|
45 |
for idx, label in enumerate(count_results):
|
46 |
label2color[label] = colors[idx]
|