Spaces:
Sleeping
Sleeping
Update
Browse files
app.py
CHANGED
|
@@ -4,6 +4,10 @@ import gradio as gr
|
|
| 4 |
with open("results.json") as f:
|
| 5 |
raw_data = json.load(f)
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Extract rows from the new format
|
| 8 |
data = raw_data["datasets"][0]["sota"]["rows"]
|
| 9 |
|
|
@@ -50,6 +54,24 @@ html = f"""
|
|
| 50 |
padding: 40px 20px;
|
| 51 |
}}
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
.table-leaderboard {{
|
| 54 |
width: 100%;
|
| 55 |
border-collapse: separate;
|
|
@@ -141,6 +163,11 @@ html = f"""
|
|
| 141 |
</style>
|
| 142 |
|
| 143 |
<div class="leaderboard-container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
<table class="table-leaderboard">
|
| 145 |
<thead>
|
| 146 |
<tr>
|
|
|
|
| 4 |
with open("results.json") as f:
|
| 5 |
raw_data = json.load(f)
|
| 6 |
|
| 7 |
+
# Extract task info
|
| 8 |
+
task_name = raw_data.get("task", "Leaderboard")
|
| 9 |
+
task_description = raw_data.get("description", "")
|
| 10 |
+
|
| 11 |
# Extract rows from the new format
|
| 12 |
data = raw_data["datasets"][0]["sota"]["rows"]
|
| 13 |
|
|
|
|
| 54 |
padding: 40px 20px;
|
| 55 |
}}
|
| 56 |
|
| 57 |
+
.task-header {{
|
| 58 |
+
margin-bottom: 32px;
|
| 59 |
+
}}
|
| 60 |
+
|
| 61 |
+
.task-title {{
|
| 62 |
+
font-size: 32px;
|
| 63 |
+
font-weight: 600;
|
| 64 |
+
color: #1f2937;
|
| 65 |
+
margin: 0 0 12px 0;
|
| 66 |
+
}}
|
| 67 |
+
|
| 68 |
+
.task-description {{
|
| 69 |
+
font-size: 15px;
|
| 70 |
+
line-height: 1.6;
|
| 71 |
+
color: #6b7280;
|
| 72 |
+
margin: 0 0 32px 0;
|
| 73 |
+
}}
|
| 74 |
+
|
| 75 |
.table-leaderboard {{
|
| 76 |
width: 100%;
|
| 77 |
border-collapse: separate;
|
|
|
|
| 163 |
</style>
|
| 164 |
|
| 165 |
<div class="leaderboard-container">
|
| 166 |
+
<div class="task-header">
|
| 167 |
+
<h1 class="task-title">{task_name}</h1>
|
| 168 |
+
<p class="task-description">{task_description}</p>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
<table class="table-leaderboard">
|
| 172 |
<thead>
|
| 173 |
<tr>
|