Spaces:
Runtime error
Runtime error
alex n
commited on
Commit
·
b5adfa8
1
Parent(s):
3ee5694
fixed size error
Browse files
app.py
CHANGED
@@ -174,25 +174,36 @@ def get_validator_data() -> pd.DataFrame:
|
|
174 |
return df.sort_values('Step', ascending=False)[['Name', 'UID', 'Axon', 'API', 'Step', 'Recent Bits', 'Updated', 'VTrust']]
|
175 |
|
176 |
# Create the Gradio interface
|
177 |
-
app = gr.Blocks(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
# Update the HTML template
|
180 |
header_html = """
|
181 |
-
<div
|
182 |
-
<h1>
|
183 |
-
<p>Real-time tracking of validator performance and bits</p>
|
184 |
</div>
|
185 |
"""
|
186 |
|
187 |
with app:
|
188 |
gr.HTML(header_html)
|
189 |
|
190 |
-
with gr.Tabs()
|
191 |
-
with gr.Tab("📊 Leaderboard"):
|
192 |
leaderboard = gr.DataFrame(
|
193 |
-
headers=[
|
194 |
-
datatype=[
|
195 |
-
|
196 |
)
|
197 |
|
198 |
with gr.Row(equal_height=True):
|
|
|
174 |
return df.sort_values('Step', ascending=False)[['Name', 'UID', 'Axon', 'API', 'Step', 'Recent Bits', 'Updated', 'VTrust']]
|
175 |
|
176 |
# Create the Gradio interface
|
177 |
+
app = gr.Blocks(
|
178 |
+
title="SN36 Validator Leaderboard",
|
179 |
+
css="""
|
180 |
+
#component-0 { height: 100vh !important; }
|
181 |
+
.gradio-container { height: 100vh !important; }
|
182 |
+
.contain { height: 100vh !important; }
|
183 |
+
.main { height: 100% !important; }
|
184 |
+
.tabs { height: calc(100% - 100px) !important; }
|
185 |
+
.tab-panel { height: 100% !important; }
|
186 |
+
#leaderboard-table { height: calc(100% - 80px) !important; }
|
187 |
+
"""
|
188 |
+
)
|
189 |
|
190 |
# Update the HTML template
|
191 |
header_html = """
|
192 |
+
<div style="text-align: center; max-width: 100%; padding: 1rem; background-color: #FF5733; border-radius: 1rem;">
|
193 |
+
<h1 style="color: white;">SN36 Validator Leaderboard</h1>
|
194 |
+
<p style="color: white;">Real-time tracking of validator performance and bits</p>
|
195 |
</div>
|
196 |
"""
|
197 |
|
198 |
with app:
|
199 |
gr.HTML(header_html)
|
200 |
|
201 |
+
with gr.Tabs(elem_id="main-tabs"):
|
202 |
+
with gr.Tab("📊 Leaderboard", elem_id="leaderboard-tab"):
|
203 |
leaderboard = gr.DataFrame(
|
204 |
+
headers=["Name", "UID", "Axon", "API", "Step", "Recent Bits", "Updated", "VTrust"],
|
205 |
+
datatype=["str", "number", "str", "str", "number", "str", "number", "number"],
|
206 |
+
elem_id="leaderboard-table"
|
207 |
)
|
208 |
|
209 |
with gr.Row(equal_height=True):
|