Spaces:
Sleeping
Sleeping
| import os | |
| import json | |
| import pandas as pd | |
| from constants import RESULTS_DIR, CATEGORY_MAP | |
| def load_all_results(): | |
| all_data = [] | |
| for file in os.listdir(RESULTS_DIR): | |
| if file.endswith(".json"): | |
| with open(os.path.join(RESULTS_DIR, file), "r") as f: | |
| data = json.load(f) | |
| for entry in data: | |
| model = entry["Model"] | |
| size, category = CATEGORY_MAP.get(model, ("N/A", "Unknown")) | |
| entry["Size"] = size | |
| entry["Category"] = category | |
| all_data.append(entry) | |
| return pd.DataFrame(all_data) | |