JosephTK commited on
Commit
582c0ea
1 Parent(s): a153b34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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]