IlyasMoutawwakil HF staff commited on
Commit
88be2d3
β€’
1 Parent(s): da05480
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -58,7 +58,14 @@ def get_bar_chart(model_type: str, top_n: int = 10, title: str = ""):
58
 
59
  subset = open_llm_race_dataset[open_llm_race_dataset["type"] == model_type]
60
  subset = subset.pivot(index="date", columns="model", values="score")
61
- subset.fillna(0, inplace=True)
 
 
 
 
 
 
 
62
  fig = bcr.bar_chart_race(
63
  subset,
64
  fig=fig,
 
58
 
59
  subset = open_llm_race_dataset[open_llm_race_dataset["type"] == model_type]
60
  subset = subset.pivot(index="date", columns="model", values="score")
61
+
62
+ was_non_null = set()
63
+ for date in subset.index:
64
+ was_non_null.update(subset.loc[date].dropna().index.tolist())
65
+ subset.loc[date, list(was_non_null)] = subset.loc[
66
+ date, list(was_non_null)
67
+ ].fillna(value=0)
68
+
69
  fig = bcr.bar_chart_race(
70
  subset,
71
  fig=fig,