openhands openhands commited on
Commit
d2c3c09
·
1 Parent(s): 5778893

Remove illustrative figures from category sub-pages

Browse files

Co-authored-by: openhands <openhands@all-hands.dev>

Files changed (1) hide show
  1. category_page_builder.py +5 -29
category_page_builder.py CHANGED
@@ -3,40 +3,16 @@ import pandas as pd
3
 
4
  # Import our UI factories and the data loader
5
  from ui_components import create_leaderboard_display, create_benchmark_details_display, get_full_leaderboard_data, create_sub_navigation_bar
6
- CATEGORY_DIAGRAM_MAP = {
7
- "Issue Resolution": "assets/bug-fixing.svg",
8
- "Greenfield": "assets/app-creation.svg",
9
- "Frontend": "assets/frontend-development.svg",
10
- "Testing": "assets/test-generation.svg",
11
- "Information Gathering": "assets/information-gathering.svg",
12
- }
13
 
14
  def build_category_page(CATEGORY_NAME, PAGE_DESCRIPTION):
15
  with gr.Column(elem_id="page-content-wrapper"):
16
  test_df, test_tag_map = get_full_leaderboard_data("test")
17
- with gr.Row(elem_id="intro-row"):
 
 
 
18
 
19
- with gr.Column(scale=1):
20
- gr.HTML(f'<h2>OpenHands Index {CATEGORY_NAME} Leaderboard <span style="font-weight: normal; color: inherit;">(Aggregate)</span></h2>', elem_id="main-header")
21
- with gr.Column(elem_id="test_nav_container", visible=True) as test_nav_container:
22
- create_sub_navigation_bar(test_tag_map, CATEGORY_NAME)
23
-
24
- gr.Markdown(PAGE_DESCRIPTION, elem_id="intro-category-paragraph")
25
-
26
- # --- The Right Column ---
27
- with gr.Column(scale=1):
28
- import os
29
- image_path = CATEGORY_DIAGRAM_MAP.get(CATEGORY_NAME)
30
- if image_path and os.path.exists(image_path):
31
- gr.Image(
32
- value=image_path,
33
- show_label=False,
34
- show_download_button=False,
35
- show_fullscreen_button=False,
36
- show_share_button=False,
37
- interactive=False,
38
- elem_id="diagram-image"
39
- )
40
 
41
  if not test_df.empty:
42
  create_leaderboard_display(
 
3
 
4
  # Import our UI factories and the data loader
5
  from ui_components import create_leaderboard_display, create_benchmark_details_display, get_full_leaderboard_data, create_sub_navigation_bar
 
 
 
 
 
 
 
6
 
7
  def build_category_page(CATEGORY_NAME, PAGE_DESCRIPTION):
8
  with gr.Column(elem_id="page-content-wrapper"):
9
  test_df, test_tag_map = get_full_leaderboard_data("test")
10
+
11
+ gr.HTML(f'<h2>OpenHands Index {CATEGORY_NAME} Leaderboard <span style="font-weight: normal; color: inherit;">(Aggregate)</span></h2>', elem_id="main-header")
12
+ with gr.Column(elem_id="test_nav_container", visible=True) as test_nav_container:
13
+ create_sub_navigation_bar(test_tag_map, CATEGORY_NAME)
14
 
15
+ gr.Markdown(PAGE_DESCRIPTION, elem_id="intro-category-paragraph")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  if not test_df.empty:
18
  create_leaderboard_display(