rzanoli commited on
Commit
831dff0
·
1 Parent(s): 9e1a6ae

Remove author prefix from model names

Browse files
Files changed (2) hide show
  1. app.py +4 -2
  2. src/display/formatting.py +3 -0
app.py CHANGED
@@ -214,14 +214,16 @@ def line_chart(dataframe):
214
  x_true = df_true['#Params (B)'].tolist()
215
  y_true = df_true['Avg. Comb. Perf. ⬆️'].tolist()
216
  labels_true = [
217
- re.search(r'>([^<>/]+/[^<>]+)<', m).group(1).split('/')[-1]
 
218
  for m in df_true['Model'].tolist()
219
  ]
220
 
221
  x_false = df_false['#Params (B)'].tolist()
222
  y_false = df_false['Avg. Comb. Perf. ⬆️'].tolist()
223
  labels_false = [
224
- re.search(r'>([^<>/]+/[^<>]+)<', m).group(1).split('/')[-1]
 
225
  for m in df_false['Model'].tolist()
226
  ]
227
 
 
214
  x_true = df_true['#Params (B)'].tolist()
215
  y_true = df_true['Avg. Comb. Perf. ⬆️'].tolist()
216
  labels_true = [
217
+ #re.search(r'>([^<>/]+/[^<>]+)<', m).group(1).split('/')[-1]
218
+ re.search(r'>([^<>]+)<', m).group(0)
219
  for m in df_true['Model'].tolist()
220
  ]
221
 
222
  x_false = df_false['#Params (B)'].tolist()
223
  y_false = df_false['Avg. Comb. Perf. ⬆️'].tolist()
224
  labels_false = [
225
+ #re.search(r'>([^<>/]+/[^<>]+)<', m).group(1).split('/')[-1]
226
+ re.search(r'>([^<>]+)<', m).group(0)
227
  for m in df_false['Model'].tolist()
228
  ]
229
 
src/display/formatting.py CHANGED
@@ -4,6 +4,9 @@ def model_hyperlink(link, model_name):
4
 
5
  def make_clickable_model(model_name):
6
  link = f"https://huggingface.co/{model_name}"
 
 
 
7
  return model_hyperlink(link, model_name)
8
 
9
 
 
4
 
5
  def make_clickable_model(model_name):
6
  link = f"https://huggingface.co/{model_name}"
7
+ #Remove author prefix from model names for EVALITA-LLM
8
+ model_name = model_name.split("/")[-1]
9
+ #print(model_name)
10
  return model_hyperlink(link, model_name)
11
 
12