fix length finally
Browse files
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
|
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)
|