Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,6 @@ with open("results.json") as f:
|
|
| 6 |
|
| 7 |
data = sorted(data, key=lambda x: x["driving_score"], reverse=True)
|
| 8 |
|
| 9 |
-
# build HTML table
|
| 10 |
rows_html = ""
|
| 11 |
for d in data:
|
| 12 |
paper = f'<a href="{d["paper_link"]}" target="_blank">{d["paper_title"]}</a>' if d["paper_link"] else ""
|
|
@@ -21,13 +20,13 @@ for d in data:
|
|
| 21 |
"""
|
| 22 |
|
| 23 |
html = f"""
|
| 24 |
-
<table style="width:100%; border-collapse:collapse;">
|
| 25 |
<thead>
|
| 26 |
<tr>
|
| 27 |
-
<th style="text-align:left;">Model Name</th>
|
| 28 |
-
<th style="text-align:left;">Driving Score</th>
|
| 29 |
-
<th style="text-align:left;">Paper</th>
|
| 30 |
-
<th style="text-align:left;">Repository</th>
|
| 31 |
</tr>
|
| 32 |
</thead>
|
| 33 |
<tbody>
|
|
@@ -36,4 +35,8 @@ html = f"""
|
|
| 36 |
</table>
|
| 37 |
"""
|
| 38 |
|
| 39 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
data = sorted(data, key=lambda x: x["driving_score"], reverse=True)
|
| 8 |
|
|
|
|
| 9 |
rows_html = ""
|
| 10 |
for d in data:
|
| 11 |
paper = f'<a href="{d["paper_link"]}" target="_blank">{d["paper_title"]}</a>' if d["paper_link"] else ""
|
|
|
|
| 20 |
"""
|
| 21 |
|
| 22 |
html = f"""
|
| 23 |
+
<table style="width:100%; border-collapse:collapse; border:1px solid #ccc;">
|
| 24 |
<thead>
|
| 25 |
<tr>
|
| 26 |
+
<th style="text-align:left; border:1px solid #ccc; padding:4px;">Model Name</th>
|
| 27 |
+
<th style="text-align:left; border:1px solid #ccc; padding:4px;">Driving Score</th>
|
| 28 |
+
<th style="text-align:left; border:1px solid #ccc; padding:4px;">Paper</th>
|
| 29 |
+
<th style="text-align:left; border:1px solid #ccc; padding:4px;">Repository</th>
|
| 30 |
</tr>
|
| 31 |
</thead>
|
| 32 |
<tbody>
|
|
|
|
| 35 |
</table>
|
| 36 |
"""
|
| 37 |
|
| 38 |
+
with gr.Blocks() as demo:
|
| 39 |
+
gr.Markdown("# Bench2Drive Leaderboard")
|
| 40 |
+
gr.HTML(html)
|
| 41 |
+
|
| 42 |
+
demo.launch()
|