Jack Monas
commited on
Commit
·
108d6f8
1
Parent(s):
71a842d
rules
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
def scoring_section():
|
|
@@ -64,6 +65,7 @@ def scoring_section():
|
|
| 64 |
"respective Hugging Face submission servers. Below is a preview of the overall leaderboard format:"
|
| 65 |
)
|
| 66 |
|
|
|
|
| 67 |
data = {
|
| 68 |
"Rank": [1, 2, 3],
|
| 69 |
"Team Name": ["Team Alpha", "Team Beta", "Team Gamma"],
|
|
@@ -83,7 +85,7 @@ def scoring_section():
|
|
| 83 |
width: 100%;
|
| 84 |
font-size: 1em;
|
| 85 |
margin: 10px 0;
|
| 86 |
-
color: #dddddd;
|
| 87 |
}
|
| 88 |
.dark-table th {
|
| 89 |
background-color: #333333;
|
|
@@ -106,11 +108,13 @@ def scoring_section():
|
|
| 106 |
</style>
|
| 107 |
"""
|
| 108 |
|
| 109 |
-
# Convert
|
| 110 |
styled_html = df.to_html(index=False, classes="dark-table")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
-
# Display the combined CSS + HTML
|
| 113 |
-
st.markdown(table_css + styled_html, unsafe_allow_html=True)
|
| 114 |
|
| 115 |
def main():
|
| 116 |
st.set_page_config(page_title="World Model Challenge")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
+
import streamlit.components.v1 as components
|
| 4 |
|
| 5 |
|
| 6 |
def scoring_section():
|
|
|
|
| 65 |
"respective Hugging Face submission servers. Below is a preview of the overall leaderboard format:"
|
| 66 |
)
|
| 67 |
|
| 68 |
+
|
| 69 |
data = {
|
| 70 |
"Rank": [1, 2, 3],
|
| 71 |
"Team Name": ["Team Alpha", "Team Beta", "Team Gamma"],
|
|
|
|
| 85 |
width: 100%;
|
| 86 |
font-size: 1em;
|
| 87 |
margin: 10px 0;
|
| 88 |
+
color: #dddddd;
|
| 89 |
}
|
| 90 |
.dark-table th {
|
| 91 |
background-color: #333333;
|
|
|
|
| 108 |
</style>
|
| 109 |
"""
|
| 110 |
|
| 111 |
+
# Convert DataFrame to HTML with the custom CSS class, hiding the index
|
| 112 |
styled_html = df.to_html(index=False, classes="dark-table")
|
| 113 |
+
html_code = table_css + styled_html
|
| 114 |
+
|
| 115 |
+
# Use st.components.v1.html to render the table
|
| 116 |
+
components.html(html_code, height=300)
|
| 117 |
|
|
|
|
|
|
|
| 118 |
|
| 119 |
def main():
|
| 120 |
st.set_page_config(page_title="World Model Challenge")
|