Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,6 +43,11 @@ async def get_leaderboard_data():
|
|
43 |
|
44 |
async def update_leaderboard_table():
|
45 |
leaderboard_data = await get_leaderboard_data()
|
|
|
|
|
|
|
|
|
|
|
46 |
return leaderboard_data
|
47 |
|
48 |
custom_css = """
|
@@ -51,12 +56,16 @@ body {
|
|
51 |
color: black;
|
52 |
font-family: Arial, sans-serif;
|
53 |
font-size: 16px;
|
|
|
|
|
54 |
}
|
55 |
|
56 |
.gradio-container {
|
57 |
-
max-width:
|
58 |
-
|
|
|
59 |
padding: 20px;
|
|
|
60 |
}
|
61 |
|
62 |
.gradio-dataframe {
|
@@ -95,8 +104,8 @@ body {
|
|
95 |
with gr.Blocks(css=custom_css) as demo:
|
96 |
gr.Markdown("# Synthia Leaderboard")
|
97 |
leaderboard_table = gr.components.Dataframe(
|
98 |
-
headers=["
|
99 |
-
datatype=["
|
100 |
interactive=False,
|
101 |
visible=True,
|
102 |
elem_id="leaderboard-table"
|
|
|
43 |
|
44 |
async def update_leaderboard_table():
|
45 |
leaderboard_data = await get_leaderboard_data()
|
46 |
+
# Add emojis to the leaderboard data
|
47 |
+
for row in leaderboard_data:
|
48 |
+
row[0] = f"{row[0]} π"
|
49 |
+
row[1] = f"{row[1]} π"
|
50 |
+
row[2] = f"{row[2]} π―"
|
51 |
return leaderboard_data
|
52 |
|
53 |
custom_css = """
|
|
|
56 |
color: black;
|
57 |
font-family: Arial, sans-serif;
|
58 |
font-size: 16px;
|
59 |
+
margin: 0;
|
60 |
+
padding: 0;
|
61 |
}
|
62 |
|
63 |
.gradio-container {
|
64 |
+
max-width: 100%;
|
65 |
+
height: 100vh;
|
66 |
+
margin: 0;
|
67 |
padding: 20px;
|
68 |
+
box-sizing: border-box;
|
69 |
}
|
70 |
|
71 |
.gradio-dataframe {
|
|
|
104 |
with gr.Blocks(css=custom_css) as demo:
|
105 |
gr.Markdown("# Synthia Leaderboard")
|
106 |
leaderboard_table = gr.components.Dataframe(
|
107 |
+
headers=["Rank π", "User π", "Score π―"],
|
108 |
+
datatype=["str", "str", "str"],
|
109 |
interactive=False,
|
110 |
visible=True,
|
111 |
elem_id="leaderboard-table"
|