hynky HF Staff commited on
Commit
745c60b
·
1 Parent(s): f43ecb1

fix length finally

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -142,7 +142,7 @@ def prepare_grouped_data(path, stat_name, grouping, top_k, direction):
142
 
143
  elif direction == "Most frequent (length)":
144
  n_docs = load_stats(path, "length", grouping)
145
- totals = {key: value.total * value.mean for key, value in n_docs.items()}
146
  keys = heapq.nlargest(top_k, totals, key=totals.get)
147
  else:
148
  keys = heapq.nsmallest(top_k, means, key=means.get)
 
142
 
143
  elif direction == "Most frequent (length)":
144
  n_docs = load_stats(path, "length", grouping)
145
+ totals = {key: value.total for key, value in n_docs.items()}
146
  keys = heapq.nlargest(top_k, totals, key=totals.get)
147
  else:
148
  keys = heapq.nsmallest(top_k, means, key=means.get)