Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
top 30 -> top 25
Browse files
app.py
CHANGED
|
@@ -692,17 +692,17 @@ async def remove_huggingfolks():
|
|
| 692 |
community_global_df_gradio = community_global_df
|
| 693 |
community_global_df_gradio['hf_user_name'] = community_global_df_gradio['hf_user_name'].apply(format_hyperlink)
|
| 694 |
|
| 695 |
-
|
| 696 |
|
| 697 |
-
|
| 698 |
-
|
| 699 |
|
| 700 |
#print(top_30_rows)
|
| 701 |
channel = bot.get_channel(1197143964994773023)
|
| 702 |
message = await channel.fetch_message(1197148293164187678)
|
| 703 |
|
| 704 |
# put into message / leaderboard
|
| 705 |
-
new_table = tabulate(
|
| 706 |
await message.edit(content=f"Updated Leaderboard:\n```\n{new_table}\n```")
|
| 707 |
print(f"Updated discord leaderboard!")
|
| 708 |
print(f"------------------------------------------------------------------------")
|
|
|
|
| 692 |
community_global_df_gradio = community_global_df
|
| 693 |
community_global_df_gradio['hf_user_name'] = community_global_df_gradio['hf_user_name'].apply(format_hyperlink)
|
| 694 |
|
| 695 |
+
top_25_exp = community_global_df.nlargest(25, 'total_exp')
|
| 696 |
|
| 697 |
+
top_25_exp['D'] = ['π₯','π₯','π₯','','','','','','','','','','','','','','','','','','','','','','']
|
| 698 |
+
top_25_rows = top_25_exp.values.tolist()
|
| 699 |
|
| 700 |
#print(top_30_rows)
|
| 701 |
channel = bot.get_channel(1197143964994773023)
|
| 702 |
message = await channel.fetch_message(1197148293164187678)
|
| 703 |
|
| 704 |
# put into message / leaderboard
|
| 705 |
+
new_table = tabulate(top_25_rows, headers=["Name", "Level", "Experience", "Rank"], tablefmt="plain")
|
| 706 |
await message.edit(content=f"Updated Leaderboard:\n```\n{new_table}\n```")
|
| 707 |
print(f"Updated discord leaderboard!")
|
| 708 |
print(f"------------------------------------------------------------------------")
|