Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
reorder
Browse files
app.py
CHANGED
|
@@ -565,6 +565,10 @@ async def remove_huggingfolks():
|
|
| 565 |
# make a copy while discord id column still exists -> use for rank in discord embeds
|
| 566 |
community_global_df_with_id = community_global_df_with_id.copy()
|
| 567 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
# drop first column (discord id -> this is so we can display the important stuff in the leaderboard)
|
| 569 |
community_global_df.drop(community_global_df.columns[0], axis=1, inplace=True)
|
| 570 |
community_global_df.drop(community_global_df.columns[1], axis=1, inplace=True)
|
|
@@ -671,7 +675,7 @@ with demo:
|
|
| 671 |
#gr.Markdown("# 📈 Experience Leaderboard")
|
| 672 |
with gr.Row():
|
| 673 |
with gr.Column():
|
| 674 |
-
gr.DataFrame(get_data, every=5, height=500, interactive=False, col_count=(3, "fixed"), column_widths=["100px","100px","100px"])
|
| 675 |
|
| 676 |
with gr.Column():
|
| 677 |
gr.BarPlot(
|
|
|
|
| 565 |
# make a copy while discord id column still exists -> use for rank in discord embeds
|
| 566 |
community_global_df_with_id = community_global_df_with_id.copy()
|
| 567 |
|
| 568 |
+
# reorder (switching from discord_user_name to hf_user_name)
|
| 569 |
+
reorder = ['discord_user_id', 'hf_user_name', 'discord_exp','discord_level', 'discord_user_name', 'hub_exp', 'total_exp', 'verified_date']
|
| 570 |
+
community_global_df = community_global_df[reorder]
|
| 571 |
+
|
| 572 |
# drop first column (discord id -> this is so we can display the important stuff in the leaderboard)
|
| 573 |
community_global_df.drop(community_global_df.columns[0], axis=1, inplace=True)
|
| 574 |
community_global_df.drop(community_global_df.columns[1], axis=1, inplace=True)
|
|
|
|
| 675 |
#gr.Markdown("# 📈 Experience Leaderboard")
|
| 676 |
with gr.Row():
|
| 677 |
with gr.Column():
|
| 678 |
+
gr.DataFrame(get_data, every=5, height=500, datatype=["markdown"], interactive=False, col_count=(3, "fixed"), column_widths=["100px","100px","100px"])
|
| 679 |
|
| 680 |
with gr.Column():
|
| 681 |
gr.BarPlot(
|