yuchenlin commited on
Commit
d74dfe0
β€’
1 Parent(s): bd62818

update style

Browse files
Files changed (4) hide show
  1. app.py +3 -2
  2. constants.py +2 -2
  3. model_info.json +2 -2
  4. utils_display.py +3 -2
app.py CHANGED
@@ -58,7 +58,8 @@ def _gstr(text):
58
 
59
  def _tab_leaderboard():
60
  global original_df, available_models
61
- with gr.TabItem("πŸ“Š Main", elem_id="od-benchmark-tab-table-ablation", id=0, elem_classes="subtab"):
 
62
  default_main_df = original_df.copy()
63
  # default_main_df.insert(0, "", range(1, 1 + len(default_main_df)))
64
  # default_main_df_no_task = default_main_df.copy()
@@ -66,7 +67,7 @@ def _tab_leaderboard():
66
  default_main_df = df_filters(default_mode, False)
67
  with gr.Row():
68
  with gr.Column(scale=5):
69
- mode_selection_radio = gr.Radio(["greedy", "sampling (Temp=0.5)", "all"], show_label=False, elem_id="rank-column-radio", value=default_mode)
70
  # with gr.Row():
71
  # with gr.Column(scale=2):
72
 
 
58
 
59
  def _tab_leaderboard():
60
  global original_df, available_models
61
+ # with gr.TabItem("πŸ“Š Main", elem_id="od-benchmark-tab-table-ablation", id=0, elem_classes="subtab"):
62
+ if True:
63
  default_main_df = original_df.copy()
64
  # default_main_df.insert(0, "", range(1, 1 + len(default_main_df)))
65
  # default_main_df_no_task = default_main_df.copy()
 
67
  default_main_df = df_filters(default_mode, False)
68
  with gr.Row():
69
  with gr.Column(scale=5):
70
+ mode_selection_radio = gr.Radio(["greedy", "all"], show_label=False, elem_id="rank-column-radio", value=default_mode)
71
  # with gr.Row():
72
  # with gr.Column(scale=2):
73
 
constants.py CHANGED
@@ -75,9 +75,9 @@ function refresh() {
75
  // Find the fieldset with the given id
76
  const fieldset = document.getElementById("rank-column-radio");
77
 
78
- // Create a new span element with the text "Rank by:"
79
  const rankBySpan = document.createElement("span");
80
- rankBySpan.textContent = "Rank by: ";
81
  rankBySpan.style.fontWeight = "bold"; // Optional: make the text bold
82
  rankBySpan.style.fontSize = "19px"; // Larger font size
83
  rankBySpan.style.paddingRight = "18px"; // Add padding on the right
 
75
  // Find the fieldset with the given id
76
  const fieldset = document.getElementById("rank-column-radio");
77
 
78
+ // Create a new span element with the text "Decoding Mode:"
79
  const rankBySpan = document.createElement("span");
80
+ rankBySpan.textContent = "Decoding Mode: ";
81
  rankBySpan.style.fontWeight = "bold"; // Optional: make the text bold
82
  rankBySpan.style.fontSize = "19px"; // Larger font size
83
  rankBySpan.style.paddingRight = "18px"; // Add padding on the right
model_info.json CHANGED
@@ -51,8 +51,8 @@
51
  "deepseek-coder-v2": {"pretty_name": "DeepSeek-Coder-V2-Inst", "hf_model_id": "deepseek-ai/DeepSeek-Coder-V2-Instruct"},
52
  "deepseek-chat": {"pretty_name": "DeepSeek-V2-Chat", "hf_model_id": "https://platform.deepseek.com/api-docs/api/deepseek-api/", "open": true},
53
  "deepseek-coder": {"pretty_name": "DeepSeek-Coder-V2", "hf_model_id": "https://platform.deepseek.com/api-docs/api/deepseek-api/", "open": true},
54
- "gemma-2-27b-it@nvidia": {"pretty_name": "Gemma-2-27B-it", "hf_model_id": "https://huggingface.co/google/gemma-2-27b-it"},
55
- "gemma-2-9b-it@nvidia": {"pretty_name": "Gemma-2-9B-it", "hf_model_id": "https://huggingface.co/google/gemma-2-9b-it"},
56
  "gemma-2-9b-it": {"pretty_name": "Gemma-2-9B-it", "hf_model_id": "https://huggingface.co/google/gemma-2-9b-it", "hidden": true},
57
  "neo_7b_instruct_v0.1": {"pretty_name": "Neo-7B-Instruct", "hf_model_id": "m-a-p/neo_7b_instruct_v0.1"},
58
  "Yi-34B-Chat": {"pretty_name": "Yi-34B-Chat", "hf_model_id": "01-ai/Yi-34B-chat"},
 
51
  "deepseek-coder-v2": {"pretty_name": "DeepSeek-Coder-V2-Inst", "hf_model_id": "deepseek-ai/DeepSeek-Coder-V2-Instruct"},
52
  "deepseek-chat": {"pretty_name": "DeepSeek-V2-Chat", "hf_model_id": "https://platform.deepseek.com/api-docs/api/deepseek-api/", "open": true},
53
  "deepseek-coder": {"pretty_name": "DeepSeek-Coder-V2", "hf_model_id": "https://platform.deepseek.com/api-docs/api/deepseek-api/", "open": true},
54
+ "gemma-2-27b-it@nvidia": {"pretty_name": "Gemma-2-27B-it", "hf_model_id": "https://huggingface.co/google/gemma-2-27b-it", "open": true},
55
+ "gemma-2-9b-it@nvidia": {"pretty_name": "Gemma-2-9B-it", "hf_model_id": "https://huggingface.co/google/gemma-2-9b-it", "open": true},
56
  "gemma-2-9b-it": {"pretty_name": "Gemma-2-9B-it", "hf_model_id": "https://huggingface.co/google/gemma-2-9b-it", "hidden": true},
57
  "neo_7b_instruct_v0.1": {"pretty_name": "Neo-7B-Instruct", "hf_model_id": "m-a-p/neo_7b_instruct_v0.1"},
58
  "Yi-34B-Chat": {"pretty_name": "Yi-34B-Chat", "hf_model_id": "01-ai/Yi-34B-chat"},
utils_display.py CHANGED
@@ -7,8 +7,9 @@ def make_clickable_model(model_name):
7
  global model_info
8
  modified_model_name = model_name
9
  if model_name in model_info:
10
- is_open_model = model_info[model_name]["hf_model_id"].startswith("http")
11
- is_open_model = model_info[model_name].get("open", False)
 
12
  if not is_open_model:
13
  link = model_info[model_name]["hf_model_id"]
14
  modified_model_name = f'πŸ”’ <a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_info[model_name]["pretty_name"]}</a>'
 
7
  global model_info
8
  modified_model_name = model_name
9
  if model_name in model_info:
10
+ is_open_model = not model_info[model_name]["hf_model_id"].startswith("http")
11
+ is_open_model = model_info[model_name].get("open", is_open_model)
12
+
13
  if not is_open_model:
14
  link = model_info[model_name]["hf_model_id"]
15
  modified_model_name = f'πŸ”’ <a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_info[model_name]["pretty_name"]}</a>'