CultriX commited on
Commit
609e5c9
·
verified ·
1 Parent(s): 3a9e805

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -143,10 +143,13 @@ def plot_heatmap():
143
  # Add a column for the total scores across all tasks
144
  df_full["Total Scores"] = df_full.iloc[:, 2:].sum(axis=1)
145
 
 
 
 
146
  plt.figure(figsize=(14, 10))
147
  sns.heatmap(
148
- df_full.iloc[:, 2:],
149
- annot=True,
150
  cmap="YlGnBu",
151
  xticklabels=list(columns[2:]) + ["Total Scores"],
152
  yticklabels=df_full["Model Configuration"]
@@ -165,6 +168,7 @@ def plot_heatmap():
165
  return pil_image, temp_image_file.name
166
 
167
 
 
168
  def scrape_mergekit_config(model_name):
169
  """
170
  For the *tiny* table’s model links.
 
143
  # Add a column for the total scores across all tasks
144
  df_full["Total Scores"] = df_full.iloc[:, 2:].sum(axis=1)
145
 
146
+ # Normalize each column individually for consistent coloring
147
+ normalized_data = df_full.iloc[:, 2:].apply(lambda x: (x - x.min()) / (x.max() - x.min()), axis=0)
148
+
149
  plt.figure(figsize=(14, 10))
150
  sns.heatmap(
151
+ normalized_data,
152
+ annot=df_full.iloc[:, 2:], # Show actual values in annotations
153
  cmap="YlGnBu",
154
  xticklabels=list(columns[2:]) + ["Total Scores"],
155
  yticklabels=df_full["Model Configuration"]
 
168
  return pil_image, temp_image_file.name
169
 
170
 
171
+
172
  def scrape_mergekit_config(model_name):
173
  """
174
  For the *tiny* table’s model links.