afght12 commited on
Commit
c3c43f6
Β·
verified Β·
1 Parent(s): 6f5ee6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
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: 800px;
58
- margin: 0 auto;
 
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=["rank", "uid", "score"],
99
- datatype=["number", "number", "number"],
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"