djstrong commited on
Commit
e03efff
1 Parent(s): f7bb3a0

model name links

Browse files
src/display/formatting.py CHANGED
@@ -1,9 +1,18 @@
1
  def model_hyperlink(link, model_name):
2
- return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
 
 
 
 
 
 
 
 
 
3
 
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
 
 
1
  def model_hyperlink(link, model_name):
2
+
3
+ splits = model_name.split(',', 1)
4
+ if len(splits) == 1:
5
+ model_name_a = splits[0]
6
+ model_name_b = ""
7
+ else:
8
+ model_name_a = splits[0]
9
+ model_name_b = ',' + splits[1]
10
+
11
+ return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name_a}</a>{model_name_b}'
12
 
13
 
14
  def make_clickable_model(model_name):
15
+ link = f"https://huggingface.co/{model_name.split(',')[0]}"
16
  return model_hyperlink(link, model_name)
17
 
18
 
src/leaderboard/read_evals.py CHANGED
@@ -69,7 +69,7 @@ class EvalResult:
69
  full_model = "/".join(org_and_model)
70
 
71
  still_on_hub, _, model_config = is_model_on_hub(
72
- full_model, config.get("model_sha", "main"), trust_remote_code=True, test_tokenizer=False
73
  )
74
  architecture = "?"
75
  if model_config is not None:
 
69
  full_model = "/".join(org_and_model)
70
 
71
  still_on_hub, _, model_config = is_model_on_hub(
72
+ full_model.split(',')[0], config.get("model_sha", "main"), trust_remote_code=True, test_tokenizer=False
73
  )
74
  architecture = "?"
75
  if model_config is not None: