yoonshik1205 commited on
Commit
65684de
β€’
1 Parent(s): 5b37695

style changes

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +3 -2
  3. utils.py +7 -4
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ†
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.44.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 4.15.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py CHANGED
@@ -27,6 +27,7 @@ with gr.Blocks(title=f'{benchname} Leaderboard', head=head_style) as demo:
27
  table, type_map = build_df()
28
  headers = [coln for coln in table.columns if not coln.startswith('_')]
29
  datatypes = [type_map[x] for x in headers]
 
30
 
31
  with gr.Row():
32
  model_name = gr.Textbox(
@@ -54,7 +55,7 @@ with gr.Blocks(title=f'{benchname} Leaderboard', head=head_style) as demo:
54
  interactive=False,
55
  wrap=True,
56
  visible=True,
57
- column_widths=[130 for _ in headers],
58
  )
59
 
60
  def filter_df(model_name, model_size, model_type):
@@ -75,7 +76,7 @@ with gr.Blocks(title=f'{benchname} Leaderboard', head=head_style) as demo:
75
  interactive=False,
76
  wrap=True,
77
  visible=True,
78
- column_widths=[130 for _ in headers],
79
  )
80
  return ret
81
 
 
27
  table, type_map = build_df()
28
  headers = [coln for coln in table.columns if not coln.startswith('_')]
29
  datatypes = [type_map[x] for x in headers]
30
+ colwidths = [50, 400, 120, 130] + [150 for _ in headers[4:]]
31
 
32
  with gr.Row():
33
  model_name = gr.Textbox(
 
55
  interactive=False,
56
  wrap=True,
57
  visible=True,
58
+ column_widths=colwidths,
59
  )
60
 
61
  def filter_df(model_name, model_size, model_type):
 
76
  interactive=False,
77
  wrap=True,
78
  visible=True,
79
+ column_widths=colwidths,
80
  )
81
  return ret
82
 
utils.py CHANGED
@@ -16,7 +16,7 @@ def build_df():
16
  name = row['name']
17
  if row['clickable']:
18
  hfp = row['hf_path']
19
- names_html.append(f'<a href="https://huggingface.co/{hfp}">{name}</a>')
20
  else:
21
  names_html.append(name)
22
  df['Name'] = names_html
@@ -34,10 +34,13 @@ def build_df():
34
 
35
  for coln in raw_df.columns:
36
  if coln.startswith('SCORE '):
37
- df[coln[6:]] = raw_df[coln].round(2)
38
- type_map[coln[6:]] = 'number'
 
 
 
39
 
40
- df.sort_values('overall', ascending=False, inplace=True)
41
  df.reset_index(drop=True, inplace=True)
42
  df.insert(0, 'Rank', list(range(1, len(df)+1)))
43
 
 
16
  name = row['name']
17
  if row['clickable']:
18
  hfp = row['hf_path']
19
+ names_html.append(f'<a href="https://huggingface.co/{hfp}" target="_blank">{name}</a>')
20
  else:
21
  names_html.append(name)
22
  df['Name'] = names_html
 
34
 
35
  for coln in raw_df.columns:
36
  if coln.startswith('SCORE '):
37
+ newc = coln[6:]
38
+ if newc == 'overall':
39
+ newc = '⭐ Overall'
40
+ df[newc] = raw_df[coln].round(2)
41
+ type_map[newc] = 'number'
42
 
43
+ df.sort_values('⭐ Overall', ascending=False, inplace=True)
44
  df.reset_index(drop=True, inplace=True)
45
  df.insert(0, 'Rank', list(range(1, len(df)+1)))
46