idolezal commited on
Commit
a0fa84e
1 Parent(s): 886492f

Display model name with smaller font

Browse files
Files changed (1) hide show
  1. server.py +4 -2
server.py CHANGED
@@ -263,8 +263,10 @@ class LeaderboardServer:
263
 
264
  model_link = data["metadata"]["link_to_model"]
265
  model_title = data["metadata"]["team_name"] + "/" + data["metadata"]["model_name"]
266
- model_title_abbr = self.abbreviate(data["metadata"]["team_name"], 28) + "\n" + self.abbreviate(data["metadata"]["model_name"], 28)
267
- local_results["model"] = f'<a href={xmlQuoteAttr(model_link)} title={xmlQuoteAttr(model_title)}>{xmlEscape(model_title_abbr, MARKDOWN_SPECIAL_CHARACTERS)}</a>'
 
 
268
  release = data["metadata"].get("submission_timestamp")
269
  release = time.strftime("%Y-%m-%d", time.gmtime(release)) if release else "N/A"
270
  local_results["release"] = release
 
263
 
264
  model_link = data["metadata"]["link_to_model"]
265
  model_title = data["metadata"]["team_name"] + "/" + data["metadata"]["model_name"]
266
+ model_title_abbr_team_name = self.abbreviate(data["metadata"]["team_name"], 28)
267
+ model_title_abbr_model_name = self.abbreviate(data["metadata"]["model_name"], 28)
268
+ model_title_abbr_html = f'<div style="font-size: 10px;">{xmlEscape(model_title_abbr_team_name, MARKDOWN_SPECIAL_CHARACTERS)}</div>{xmlEscape(model_title_abbr_model_name, MARKDOWN_SPECIAL_CHARACTERS)}'
269
+ local_results["model"] = f'<a href={xmlQuoteAttr(model_link)} title={xmlQuoteAttr(model_title)}>{model_title_abbr_html}</a>'
270
  release = data["metadata"].get("submission_timestamp")
271
  release = time.strftime("%Y-%m-%d", time.gmtime(release)) if release else "N/A"
272
  local_results["release"] = release