hysts HF staff commited on
Commit
3355ed8
1 Parent(s): 0202cf7
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -80,11 +80,9 @@ except Exception:
80
 
81
  try:
82
  ORIGINAL_DF = get_leaderboard_df(CONTENTS_REPO, COLS, BENCHMARK_COLS)
83
- MAX_MODEL_SIZE = ORIGINAL_DF["#Params (B)"].max()
84
  except Exception as e:
85
  print(f"Error getting leaderboard df: {e}")
86
  ORIGINAL_DF = pd.DataFrame()
87
- MAX_MODEL_SIZE = 0
88
 
89
 
90
  # Searching and filtering
@@ -280,6 +278,7 @@ def plot_size_vs_score(df_filtered: pd.DataFrame) -> go.Figure:
280
  var_name="Category",
281
  value_name="Score",
282
  )
 
283
  fig = px.scatter(
284
  df,
285
  x="#Params (B)",
@@ -295,7 +294,7 @@ def plot_size_vs_score(df_filtered: pd.DataFrame) -> go.Figure:
295
  for trace in fig.data:
296
  if trace.name != "AVG":
297
  trace.visible = "legendonly"
298
- fig.update_layout(xaxis_range=[0, MAX_MODEL_SIZE * 1.2], yaxis_range=[0, 1])
299
  fig.update_layout(
300
  updatemenus=[
301
  dict(
 
80
 
81
  try:
82
  ORIGINAL_DF = get_leaderboard_df(CONTENTS_REPO, COLS, BENCHMARK_COLS)
 
83
  except Exception as e:
84
  print(f"Error getting leaderboard df: {e}")
85
  ORIGINAL_DF = pd.DataFrame()
 
86
 
87
 
88
  # Searching and filtering
 
278
  var_name="Category",
279
  value_name="Score",
280
  )
281
+ max_model_size = df["#Params (B)"].max()
282
  fig = px.scatter(
283
  df,
284
  x="#Params (B)",
 
294
  for trace in fig.data:
295
  if trace.name != "AVG":
296
  trace.visible = "legendonly"
297
+ fig.update_layout(xaxis_range=[0, max_model_size * 1.2], yaxis_range=[0, 1])
298
  fig.update_layout(
299
  updatemenus=[
300
  dict(