afght12 commited on
Commit
e07ccbf
·
verified ·
1 Parent(s): f14de2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -10
app.py CHANGED
@@ -46,15 +46,54 @@ async def update_leaderboard_table():
46
  leaderboard_data = await get_leaderboard_data()
47
  return leaderboard_data
48
 
49
- with gr.Blocks(css="""
50
- body { background-color: white; color: black; font-family: Arial, sans-serif; font-size: 16px; }
51
- .gradio-container { max-width: 800px; margin: 0 auto; padding: 20px; }
52
- .gradio-dataframe { width: 100%; background-color: #f5f5f5; border-collapse: collapse; margin-top: 20px; }
53
- .gradio-dataframe th, .gradio-dataframe td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; }
54
- .gradio-dataframe th { background-color: #f2f2f2; font-weight: bold; }
55
- .gradio-button { background-color: #4CAF50; color: white; padding: 10px 20px; border: none; cursor: pointer; margin-top: 20px; }
56
- .gradio-button:hover { background-color: #45a049; }
57
- """) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  gr.Markdown("# Synthia Leaderboard")
59
  leaderboard_table = gr.components.Dataframe(
60
  headers=["rank", "uid", "score"],
@@ -65,7 +104,7 @@ with gr.Blocks(css="""
65
  )
66
  refresh_button = gr.Button("Refresh Leaderboard")
67
  refresh_button.click(fn=update_leaderboard_table, outputs=leaderboard_table)
68
-
69
  # Initial load of leaderboard data
70
  demo.load(update_leaderboard_table, inputs=None, outputs=leaderboard_table)
71
 
 
46
  leaderboard_data = await get_leaderboard_data()
47
  return leaderboard_data
48
 
49
+ custom_css = """
50
+ body {
51
+ background-color: white;
52
+ color: black;
53
+ font-family: Arial, sans-serif;
54
+ font-size: 16px;
55
+ }
56
+
57
+ .gradio-container {
58
+ max-width: 800px;
59
+ margin: 0 auto;
60
+ padding: 20px;
61
+ }
62
+
63
+ .gradio-dataframe {
64
+ width: 100%;
65
+ background-color: #f5f5f5;
66
+ border-collapse: collapse;
67
+ margin-top: 20px;
68
+ }
69
+
70
+ .gradio-dataframe th,
71
+ .gradio-dataframe td {
72
+ padding: 10px;
73
+ text-align: left;
74
+ border-bottom: 1px solid #ddd;
75
+ }
76
+
77
+ .gradio-dataframe th {
78
+ background-color: #f2f2f2;
79
+ font-weight: bold;
80
+ }
81
+
82
+ .gradio-button {
83
+ background-color: #4CAF50;
84
+ color: white;
85
+ padding: 10px 20px;
86
+ border: none;
87
+ cursor: pointer;
88
+ margin-top: 20px;
89
+ }
90
+
91
+ .gradio-button:hover {
92
+ background-color: #45a049;
93
+ }
94
+ """
95
+
96
+ with gr.Blocks(css=custom_css) as demo:
97
  gr.Markdown("# Synthia Leaderboard")
98
  leaderboard_table = gr.components.Dataframe(
99
  headers=["rank", "uid", "score"],
 
104
  )
105
  refresh_button = gr.Button("Refresh Leaderboard")
106
  refresh_button.click(fn=update_leaderboard_table, outputs=leaderboard_table)
107
+
108
  # Initial load of leaderboard data
109
  demo.load(update_leaderboard_table, inputs=None, outputs=leaderboard_table)
110