Jack Monas
commited on
Commit
·
346b9ec
1
Parent(s):
4f2d396
rules
Browse files
app.py
CHANGED
|
@@ -75,41 +75,38 @@ def scoring_section():
|
|
| 75 |
|
| 76 |
leaderboard_df = pd.DataFrame(data)
|
| 77 |
|
| 78 |
-
#
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
]
|
| 108 |
-
}
|
| 109 |
-
])
|
| 110 |
|
| 111 |
-
#
|
| 112 |
-
st.
|
| 113 |
|
| 114 |
|
| 115 |
|
|
|
|
| 75 |
|
| 76 |
leaderboard_df = pd.DataFrame(data)
|
| 77 |
|
| 78 |
+
# Define custom CSS for a cleaner table
|
| 79 |
+
table_css = """
|
| 80 |
+
<style>
|
| 81 |
+
table {
|
| 82 |
+
border-collapse: collapse;
|
| 83 |
+
margin: 10px 0;
|
| 84 |
+
font-size: 1em;
|
| 85 |
+
width: 100%;
|
| 86 |
+
}
|
| 87 |
+
th, td {
|
| 88 |
+
border: 1px solid #ddd;
|
| 89 |
+
padding: 8px;
|
| 90 |
+
text-align: center;
|
| 91 |
+
}
|
| 92 |
+
th {
|
| 93 |
+
background-color: #4C4C4C;
|
| 94 |
+
color: #ffffff;
|
| 95 |
+
}
|
| 96 |
+
tr:nth-child(even) {
|
| 97 |
+
background-color: #f9f9f9;
|
| 98 |
+
}
|
| 99 |
+
tr:nth-child(odd) {
|
| 100 |
+
background-color: #ffffff;
|
| 101 |
+
}
|
| 102 |
+
</style>
|
| 103 |
+
"""
|
| 104 |
+
|
| 105 |
+
# Convert the DataFrame to HTML without showing the index
|
| 106 |
+
styled_html = leaderboard_df.to_html(index=False)
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
+
# Combine the CSS with the HTML table
|
| 109 |
+
st.markdown(table_css + styled_html, unsafe_allow_html=True)
|
| 110 |
|
| 111 |
|
| 112 |
|