Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -456,7 +456,13 @@ def build_multifile_category_df(validNames, results, summaries, categories, cate
|
|
| 456 |
|
| 457 |
for fn in validNames:
|
| 458 |
currAnnotation, _ = results[fn]
|
| 459 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 460 |
summaries[fn]["categories"] = (catSummary, extraCats)
|
| 461 |
for extra in extraCats:
|
| 462 |
df6_dict.setdefault(extra, [])
|
|
|
|
| 456 |
|
| 457 |
for fn in validNames:
|
| 458 |
currAnnotation, _ = results[fn]
|
| 459 |
+
# categorySelect is now a global token list [[token,...], ...]; extract raw IDs for fn
|
| 460 |
+
prefix = fn + ": "
|
| 461 |
+
per_file_selections = [
|
| 462 |
+
[t[len(prefix):] for t in tokens if t.startswith(prefix)]
|
| 463 |
+
for tokens in categorySelect
|
| 464 |
+
]
|
| 465 |
+
catSummary, extraCats = su.calcCategories(currAnnotation, per_file_selections)
|
| 466 |
summaries[fn]["categories"] = (catSummary, extraCats)
|
| 467 |
for extra in extraCats:
|
| 468 |
df6_dict.setdefault(extra, [])
|