Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,9 +50,9 @@ def read_label_frequencies():
|
|
50 |
|
51 |
def get_label_fractions(label_counts_dict):
|
52 |
print("Getting label proportions.")
|
53 |
-
label_list = list(
|
54 |
-
denom = sum(
|
55 |
-
label_fractions = [
|
56 |
return label_list, label_fractions
|
57 |
|
58 |
|
|
|
50 |
|
51 |
def get_label_fractions(label_counts_dict):
|
52 |
print("Getting label proportions.")
|
53 |
+
label_list = list(label_counts_dict.keys())
|
54 |
+
denom = sum(label_counts_dict.values())
|
55 |
+
label_fractions = [label_counts_dict[key]/denom for key in label_counts_dict]
|
56 |
return label_list, label_fractions
|
57 |
|
58 |
|