jitinpatronus commited on
Commit
c8acb1e
·
verified ·
1 Parent(s): e5da7a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -9
app.py CHANGED
@@ -4,6 +4,7 @@ import os
4
  import shutil
5
  import json
6
  from zipfile import ZipFile
 
7
 
8
  # Function to load leaderboard data from a CSV file
9
  def load_leaderboard_data(csv_file_path):
@@ -51,18 +52,19 @@ leaderboard2 = load_leaderboard_data("leaderboard_gaia.csv")
51
  with gr.Blocks() as demo:
52
  gr.Markdown("# 🏆 TRAIL: Trace Reasoning and Agentic Issue Localization Leaderboard")
53
 
54
- with gr.Row():
55
- with gr.Column():
56
- gr.Markdown("## TRAIL-SWE Leaderboard")
57
- gr.Dataframe(leaderboard1)
58
- with gr.Column():
59
- gr.Markdown("## TRAIL-GAIA Leaderboard")
60
- gr.Dataframe(leaderboard2)
 
61
 
62
- with gr.Row():
63
  gr.Markdown("## Submit Your ZIP of JSONs")
64
 
65
- with gr.Row():
66
  with gr.Column():
67
  file_input = gr.File(
68
  label="Upload ZIP File",
@@ -85,5 +87,13 @@ with gr.Blocks() as demo:
85
  outputs=output
86
  )
87
 
 
 
 
 
 
 
 
 
88
  if __name__ == "__main__":
89
  demo.launch()
 
4
  import shutil
5
  import json
6
  from zipfile import ZipFile
7
+ import re
8
 
9
  # Function to load leaderboard data from a CSV file
10
  def load_leaderboard_data(csv_file_path):
 
52
  with gr.Blocks() as demo:
53
  gr.Markdown("# 🏆 TRAIL: Trace Reasoning and Agentic Issue Localization Leaderboard")
54
 
55
+ with gr.Tab("LEADERBOARD"):
56
+ with gr.Row():
57
+ with gr.Column():
58
+ gr.Markdown("## TRAIL-SWE Leaderboard")
59
+ gr.Dataframe(leaderboard1)
60
+ with gr.Column():
61
+ gr.Markdown("## TRAIL-GAIA Leaderboard")
62
+ gr.Dataframe(leaderboard2)
63
 
64
+ with gr.Tab("SUBMIT ZIP"):
65
  gr.Markdown("## Submit Your ZIP of JSONs")
66
 
67
+ #with gr.Row():
68
  with gr.Column():
69
  file_input = gr.File(
70
  label="Upload ZIP File",
 
87
  outputs=output
88
  )
89
 
90
+ with open("README.md", "r", encoding="utf-8") as f:
91
+ README_CONTENT = f.read()
92
+ yaml_front_matter = re.compile(r"^---\s*.*?\s*---\s*", re.DOTALL)
93
+ readme_content_without_yaml = re.sub(yaml_front_matter, "", README_CONTENT).strip()
94
+
95
+ with gr.Tab("README"):
96
+ gr.Markdown(readme_content_without_yaml)
97
+
98
  if __name__ == "__main__":
99
  demo.launch()