Spaces:
Sleeping
Sleeping
Fix leaderboard HTML — remove indentation that causes stray </tbody> rendering
Browse files
app.py
CHANGED
|
@@ -1372,39 +1372,21 @@ if st.session_state.leaderboard:
|
|
| 1372 |
outcome_icon = "\u2705" if is_safe else "\u2622\ufe0f"
|
| 1373 |
nuke_col = str(entry.get("nuclear_turn", "\u2014"))
|
| 1374 |
|
| 1375 |
-
rows_html +=
|
| 1376 |
-
|
| 1377 |
-
<td>{
|
| 1378 |
-
<td>{entry
|
| 1379 |
-
<td>{
|
| 1380 |
-
|
| 1381 |
-
<td>{entry['cooperation']}</td>
|
| 1382 |
-
<td>{nuke_col}</td>
|
| 1383 |
-
<td>{entry['turns']}</td>
|
| 1384 |
-
<td>{entry['seed']}</td>
|
| 1385 |
-
</tr>
|
| 1386 |
-
"""
|
| 1387 |
|
| 1388 |
st.markdown(
|
| 1389 |
-
f"""
|
| 1390 |
-
|
| 1391 |
-
|
| 1392 |
-
|
| 1393 |
-
|
| 1394 |
-
|
| 1395 |
-
|
| 1396 |
-
<th>Max Level</th>
|
| 1397 |
-
<th>Cooperation</th>
|
| 1398 |
-
<th>Nuclear Turn</th>
|
| 1399 |
-
<th>Turns</th>
|
| 1400 |
-
<th>Seed</th>
|
| 1401 |
-
</tr>
|
| 1402 |
-
</thead>
|
| 1403 |
-
<tbody>
|
| 1404 |
-
{rows_html}
|
| 1405 |
-
</tbody>
|
| 1406 |
-
</table>
|
| 1407 |
-
""",
|
| 1408 |
unsafe_allow_html=True,
|
| 1409 |
)
|
| 1410 |
|
|
|
|
| 1372 |
outcome_icon = "\u2705" if is_safe else "\u2622\ufe0f"
|
| 1373 |
nuke_col = str(entry.get("nuclear_turn", "\u2014"))
|
| 1374 |
|
| 1375 |
+
rows_html += (
|
| 1376 |
+
f"<tr><td>{i + 1}</td><td>{entry.get('preset', 'Custom')}</td>"
|
| 1377 |
+
f"<td>{outcome_icon} {outcome}</td><td>{entry['max_level']}/9</td>"
|
| 1378 |
+
f"<td>{entry['cooperation']}</td><td>{nuke_col}</td>"
|
| 1379 |
+
f"<td>{entry['turns']}</td><td>{entry['seed']}</td></tr>"
|
| 1380 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1381 |
|
| 1382 |
st.markdown(
|
| 1383 |
+
f"""<table class="leaderboard-table">
|
| 1384 |
+
<thead><tr>
|
| 1385 |
+
<th>#</th><th>Preset</th><th>Outcome</th><th>Max Level</th>
|
| 1386 |
+
<th>Cooperation</th><th>Nuclear Turn</th><th>Turns</th><th>Seed</th>
|
| 1387 |
+
</tr></thead>
|
| 1388 |
+
<tbody>{rows_html}</tbody>
|
| 1389 |
+
</table>""",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1390 |
unsafe_allow_html=True,
|
| 1391 |
)
|
| 1392 |
|