idolezal commited on
Commit
288544e
β€’
1 Parent(s): 20d80fe

Made the URL clickable

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -15,7 +15,7 @@ from content import (
15
  RANKING_AFTER_SUBMISSION_MARKDOWN,
16
  MORE_DETAILS_MARKDOWN,
17
  )
18
- from server import LeaderboardServer
19
 
20
  leaderboard_server = LeaderboardServer()
21
 
@@ -172,7 +172,11 @@ def create_task_abbreviation_legend_table(category):
172
  task_abbreviation_legend_body = []
173
  abbreviation2name = leaderboard_server.CATEGORY_TO_TASK_ABBREVIATION_TO_DETAILS[category]
174
  for abbr, name, url in abbreviation2name.values():
175
- task_abbreviation_legend_body.append([abbr, name, url])
 
 
 
 
176
 
177
  return task_abbreviation_legend_body
178
 
@@ -310,7 +314,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
310
  "URL",
311
  ],
312
  column_widths=["150px"],
313
- datatype="str",
314
  label="Descriptions of the tasks",
315
  visible=False,
316
  interactive=False,
 
15
  RANKING_AFTER_SUBMISSION_MARKDOWN,
16
  MORE_DETAILS_MARKDOWN,
17
  )
18
+ from server import LeaderboardServer, xmlAndMarkdownEscape, xmlQuoteAttr
19
 
20
  leaderboard_server = LeaderboardServer()
21
 
 
172
  task_abbreviation_legend_body = []
173
  abbreviation2name = leaderboard_server.CATEGORY_TO_TASK_ABBREVIATION_TO_DETAILS[category]
174
  for abbr, name, url in abbreviation2name.values():
175
+ task_abbreviation_legend_body.append([
176
+ xmlAndMarkdownEscape(abbr),
177
+ xmlAndMarkdownEscape(name),
178
+ f'<a href={xmlQuoteAttr(url)}>{xmlAndMarkdownEscape(url)}</a>',
179
+ ])
180
 
181
  return task_abbreviation_legend_body
182
 
 
314
  "URL",
315
  ],
316
  column_widths=["150px"],
317
+ datatype="markdown",
318
  label="Descriptions of the tasks",
319
  visible=False,
320
  interactive=False,