unknown commited on
Commit
b767870
·
1 Parent(s): a5b8c9c
Files changed (3) hide show
  1. about.py +2 -7
  2. app.py +6 -10
  3. css_html_js.py +1 -0
about.py CHANGED
@@ -1,11 +1,6 @@
1
- TITLE = """<h1 align="center" id="space-title">SGI Leaderboard</h1>"""
2
 
3
-
4
- INTRODUCTION_TEXT = """
5
- ## Scientific General Intelligence (SGI) is defined as an AI system that can autonomously navigate the full, iterative cycle of scientific inquiry—Deliberation, Conception, Action, and Perception—with the versatility and proficiency of a human scientist. SGI-Bench operationalizes this definition via four scientist-aligned task families: deep research, idea generation, AI-assisted experiments (dry/wet), and multimodal experimental reasoning. The benchmark spans 10 disciplines and ~1,000 expert-curated samples inspired by Science's 125 Big Questions.
6
- """
7
-
8
- CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
9
  CITATION_BUTTON_TEXT = r"""
10
  @article{sgi2025,
11
  title={SGI-Bench: Scientific Intelligence Benchmark via Scientist-Aligned Workflows},
 
1
+ TITLE = """<h1 align="center" id="space-title">SGI-Bench Leaderboard</h1>"""
2
 
3
+ CITATION_BUTTON_LABEL = "📖 Citation"
 
 
 
 
 
4
  CITATION_BUTTON_TEXT = r"""
5
  @article{sgi2025,
6
  title={SGI-Bench: Scientific Intelligence Benchmark via Scientist-Aligned Workflows},
app.py CHANGED
@@ -1,11 +1,9 @@
1
  import gradio as gr
2
  from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
3
  import pandas as pd
4
- from apscheduler.schedulers.background import BackgroundScheduler
5
  from about import (
6
  CITATION_BUTTON_LABEL,
7
  CITATION_BUTTON_TEXT,
8
- INTRODUCTION_TEXT,
9
  TITLE,
10
  )
11
  from css_html_js import custom_css
@@ -40,14 +38,14 @@ def build_leaderboard_df():
40
  type = item["type"]
41
  scores = item["scores"]
42
  row = {
43
- "Type": type,
44
  "Model": name,
 
45
  "SGI-Score": round(sum(scores) / len(scores), 2),
46
  }
47
  for i, col in enumerate(task_cols):
48
  row[col] = scores[i]
49
  rows.append(row)
50
- cols = ["Type", "Model", "SGI-Score"] + task_cols
51
  df = pd.DataFrame(rows, columns=cols).sort_values(by=["SGI-Score"], ascending=False).round(decimals=2)
52
  return df
53
 
@@ -56,8 +54,8 @@ LEADERBOARD_DF = build_leaderboard_df()
56
 
57
  def init_leaderboard(dataframe):
58
  datatypes = ["str", "str", "number", "number", "number", "number", "number", "number"]
59
- default_selection = ["Type","Model","SGI-Score","Deep Research","Idea Generation","Dry Experiment","Wet Experiment","Experimental Reasoning"]
60
- cant_deselect = ["Type","Model"]
61
  return Leaderboard(
62
  value=dataframe,
63
  datatype=datatypes,
@@ -76,19 +74,17 @@ def init_leaderboard(dataframe):
76
  demo = gr.Blocks(css=custom_css)
77
  with demo:
78
  gr.HTML(TITLE)
79
- gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
80
 
81
  leaderboard = init_leaderboard(LEADERBOARD_DF)
82
 
83
  with gr.Row():
84
- with gr.Accordion("📖 Citation", open=False):
85
  citation_button = gr.Textbox(
86
  value=CITATION_BUTTON_TEXT,
87
  label=CITATION_BUTTON_LABEL,
88
- lines=20,
89
  elem_id="citation-button",
90
  show_copy_button=True,
91
  )
92
 
93
-
94
  demo.queue(default_concurrency_limit=40).launch()
 
1
  import gradio as gr
2
  from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
3
  import pandas as pd
 
4
  from about import (
5
  CITATION_BUTTON_LABEL,
6
  CITATION_BUTTON_TEXT,
 
7
  TITLE,
8
  )
9
  from css_html_js import custom_css
 
38
  type = item["type"]
39
  scores = item["scores"]
40
  row = {
 
41
  "Model": name,
42
+ "Type": type,
43
  "SGI-Score": round(sum(scores) / len(scores), 2),
44
  }
45
  for i, col in enumerate(task_cols):
46
  row[col] = scores[i]
47
  rows.append(row)
48
+ cols = ["Model", "Type", "SGI-Score"] + task_cols
49
  df = pd.DataFrame(rows, columns=cols).sort_values(by=["SGI-Score"], ascending=False).round(decimals=2)
50
  return df
51
 
 
54
 
55
  def init_leaderboard(dataframe):
56
  datatypes = ["str", "str", "number", "number", "number", "number", "number", "number"]
57
+ default_selection = ["Model","Type","SGI-Score","Deep Research","Idea Generation","Dry Experiment","Wet Experiment","Experimental Reasoning"]
58
+ cant_deselect = ["Model","Type",]
59
  return Leaderboard(
60
  value=dataframe,
61
  datatype=datatypes,
 
74
  demo = gr.Blocks(css=custom_css)
75
  with demo:
76
  gr.HTML(TITLE)
 
77
 
78
  leaderboard = init_leaderboard(LEADERBOARD_DF)
79
 
80
  with gr.Row():
81
+ with gr.Group():
82
  citation_button = gr.Textbox(
83
  value=CITATION_BUTTON_TEXT,
84
  label=CITATION_BUTTON_LABEL,
85
+ lines=CITATION_BUTTON_TEXT.count('\n')+1,
86
  elem_id="citation-button",
87
  show_copy_button=True,
88
  )
89
 
 
90
  demo.queue(default_concurrency_limit=40).launch()
css_html_js.py CHANGED
@@ -2,6 +2,7 @@ custom_css = """
2
 
3
  .markdown-text {
4
  font-size: 16px !important;
 
5
  }
6
 
7
  #models-to-add-text {
 
2
 
3
  .markdown-text {
4
  font-size: 16px !important;
5
+ text-align: center;
6
  }
7
 
8
  #models-to-add-text {