loodvanniekerkginkgo commited on
Commit
ba1131a
·
1 Parent(s): 3edbc93

Adding footnote

Browse files
Files changed (1) hide show
  1. app.py +16 -13
app.py CHANGED
@@ -10,18 +10,11 @@ from about import ASSAY_LIST, ASSAY_RENAME, ASSAY_EMOJIS, submissions_repo, API
10
  from submit import make_submission
11
  from about import ABOUT_TEXT, FAQS
12
 
13
- def get_leaderboard_table(df_results: pd.DataFrame, assay: str | None = None):
14
- # ds = load_dataset(results_repo, split='train', download_mode="force_redownload")
15
- # full_df = pd.DataFrame(ds)
16
- # full_df['full results'] = full_df['result_filename'].apply(lambda x: make_boundary_clickable(x)).astype(str)
17
-
18
  # full_df.rename(columns={'submission_time': 'submission time', 'problem_type': 'problem type'}, inplace=True)
19
- # to_show = full_df.copy(deep=True)
20
- # to_show = to_show[to_show['user'] != 'test']
21
- # to_show = to_show[['submission time', 'problem type', 'user', 'score', 'full results']]
22
  # to_show['user'] = to_show['user'].apply(lambda x: make_user_clickable(x)).astype(str)
23
-
24
- # Previously hosted on HF hub, local for now (Can also pull directly from github backend)
25
  column_order = ["model", "property", "spearman", "spearman_cross_val"]
26
  df = df_results.query("assay.isin(@ASSAY_RENAME.keys())").copy()
27
  if assay is not None:
@@ -30,7 +23,7 @@ def get_leaderboard_table(df_results: pd.DataFrame, assay: str | None = None):
30
  return df.sort_values(by="spearman", ascending=False)
31
 
32
  def get_leaderboard_object(df_results: pd.DataFrame, assay: str | None = None):
33
- df = get_leaderboard_table(df_results=df_results, assay=assay)
34
  filter_columns = ["model"]
35
  if assay is None:
36
  filter_columns.append("property")
@@ -50,6 +43,7 @@ with gr.Blocks() as demo:
50
  ## Welcome to the Ginkgo Antibody Developability Benchmark!
51
 
52
  Participants can submit their model to the leaderboard by uploading a CSV file (see the "✉️ Submit" tab).
 
53
  """)
54
  df = fetch_hf_results()
55
  with gr.Tabs(elem_classes="tab-buttons"):
@@ -93,7 +87,8 @@ with gr.Blocks() as demo:
93
  )
94
  gr.Markdown(ABOUT_TEXT)
95
  for question, answer in FAQS.items():
96
- gr.Accordion(question, answer)
 
97
 
98
  with gr.TabItem("✉️ Submit", elem_id="boundary-benchmark-tab-table"):
99
  gr.Markdown(
@@ -138,7 +133,15 @@ with gr.Blocks() as demo:
138
  inputs=[message],
139
  outputs=[message],
140
  )
141
-
 
 
 
 
 
 
 
 
142
 
143
  if __name__ == "__main__":
144
  demo.launch()
 
10
  from submit import make_submission
11
  from about import ABOUT_TEXT, FAQS
12
 
13
+ def format_leaderboard_table(df_results: pd.DataFrame, assay: str | None = None):
14
+ # Previous things that were nice in the constellaration leaderboard:
15
+ # Having a submission time column, and a user column where the username is clickable (this is a pro for usability but con for anonymity)
 
 
16
  # full_df.rename(columns={'submission_time': 'submission time', 'problem_type': 'problem type'}, inplace=True)
 
 
 
17
  # to_show['user'] = to_show['user'].apply(lambda x: make_user_clickable(x)).astype(str)
 
 
18
  column_order = ["model", "property", "spearman", "spearman_cross_val"]
19
  df = df_results.query("assay.isin(@ASSAY_RENAME.keys())").copy()
20
  if assay is not None:
 
23
  return df.sort_values(by="spearman", ascending=False)
24
 
25
  def get_leaderboard_object(df_results: pd.DataFrame, assay: str | None = None):
26
+ df = format_leaderboard_table(df_results=df_results, assay=assay)
27
  filter_columns = ["model"]
28
  if assay is None:
29
  filter_columns.append("property")
 
43
  ## Welcome to the Ginkgo Antibody Developability Benchmark!
44
 
45
  Participants can submit their model to the leaderboard by uploading a CSV file (see the "✉️ Submit" tab).
46
+ See more details in the "❔About" tab.
47
  """)
48
  df = fetch_hf_results()
49
  with gr.Tabs(elem_classes="tab-buttons"):
 
87
  )
88
  gr.Markdown(ABOUT_TEXT)
89
  for question, answer in FAQS.items():
90
+ with gr.Accordion(question):
91
+ gr.Markdown(answer)
92
 
93
  with gr.TabItem("✉️ Submit", elem_id="boundary-benchmark-tab-table"):
94
  gr.Markdown(
 
133
  inputs=[message],
134
  outputs=[message],
135
  )
136
+ # Footnote
137
+ gr.Markdown(
138
+ """
139
+ <div style="text-align: center; font-size: 14px; color: gray; margin-top: 2em;">
140
+ 📬 For questions or feedback, contact <a href="mailto:[email protected]">[email protected]</a> or visit the Community tab at the top of this page.
141
+ </div>
142
+ """,
143
+ elem_id="contact-footer"
144
+ )
145
 
146
  if __name__ == "__main__":
147
  demo.launch()