Spaces:
Sleeping
Sleeping
Commit
·
0765653
1
Parent(s):
025d4ad
with logo
Browse files
app.py
CHANGED
|
@@ -4,11 +4,39 @@ Streamlit dashboard for the Dippy Roleplay Subnet Leaderboard
|
|
| 4 |
import requests
|
| 5 |
import streamlit as st
|
| 6 |
import pandas as pd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
def leaderboard_dashboard():
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
st.markdown("---")
|
| 13 |
|
| 14 |
# Add emojis based on the status
|
|
@@ -41,7 +69,7 @@ def leaderboard_dashboard():
|
|
| 41 |
|
| 42 |
leaderboard = leaderboard[column_order]
|
| 43 |
|
| 44 |
-
st.
|
| 45 |
|
| 46 |
if __name__ == '__main__':
|
| 47 |
leaderboard_dashboard()
|
|
|
|
| 4 |
import requests
|
| 5 |
import streamlit as st
|
| 6 |
import pandas as pd
|
| 7 |
+
import base64
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
# Define the Streamlit dashboard
|
| 12 |
+
# make the column wide
|
| 13 |
+
st.markdown(
|
| 14 |
+
f"""
|
| 15 |
+
<style>
|
| 16 |
+
.reportview-container .main .block-container{{
|
| 17 |
+
max-width: 95%;
|
| 18 |
+
}}
|
| 19 |
+
</style>
|
| 20 |
+
""",
|
| 21 |
+
unsafe_allow_html=True,
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
|
| 25 |
def leaderboard_dashboard():
|
| 26 |
+
# load the logo from image.txt file as base64
|
| 27 |
+
with open("image.txt", "r") as f:
|
| 28 |
+
image = f.read()
|
| 29 |
+
|
| 30 |
+
st.markdown(
|
| 31 |
+
f"""
|
| 32 |
+
<div style="text-align: center;">
|
| 33 |
+
<img src="data:image/png;base64,{image}" alt="Dippy Roleplay Logo" width="700" height="400" style="margin-bottom: 2rem;">
|
| 34 |
+
<h1 style="margin-top: 0;">SN11-Dippy-Roleplay Leaderboard</h1>
|
| 35 |
+
<div style="font-size: 18px;">This is the leaderboard for the Dippy validation API hosted by SN11.</div>
|
| 36 |
+
</div>
|
| 37 |
+
""",
|
| 38 |
+
unsafe_allow_html=True,
|
| 39 |
+
)
|
| 40 |
st.markdown("---")
|
| 41 |
|
| 42 |
# Add emojis based on the status
|
|
|
|
| 69 |
|
| 70 |
leaderboard = leaderboard[column_order]
|
| 71 |
|
| 72 |
+
st.write(leaderboard)
|
| 73 |
|
| 74 |
if __name__ == '__main__':
|
| 75 |
leaderboard_dashboard()
|
image.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|