Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
top_num_exp -> 30 (fixed discord leaderboard)
Browse files
app.py
CHANGED
@@ -689,13 +689,13 @@ async def remove_huggingfolks():
|
|
689 |
community_global_df['total_exp'] = pd.to_numeric(community_global_df['total_exp'], errors='coerce').fillna(0).astype(int)
|
690 |
community_global_df = community_global_df.nlargest(len(community_global_df), 'total_exp')
|
691 |
# add profile hyperlinks to gradio demo
|
692 |
-
community_global_df_gradio = community_global_df.copy()
|
693 |
community_global_df_gradio['hf_user_name'] = community_global_df_gradio['hf_user_name'].apply(format_hyperlink)
|
694 |
|
695 |
-
top_num =
|
696 |
top_num_exp = community_global_df.nlargest(top_num, 'total_exp')
|
697 |
|
698 |
-
top_num_exp['D'] = ['π₯','π₯','π₯','','','','','','','']
|
699 |
top_num_rows = top_num_exp.values.tolist()
|
700 |
|
701 |
#print(top_30_rows)
|
|
|
689 |
community_global_df['total_exp'] = pd.to_numeric(community_global_df['total_exp'], errors='coerce').fillna(0).astype(int)
|
690 |
community_global_df = community_global_df.nlargest(len(community_global_df), 'total_exp')
|
691 |
# add profile hyperlinks to gradio demo
|
692 |
+
community_global_df_gradio = community_global_df.copy() # must be a COPY, otherwise it adds a new name for the same dataframe.
|
693 |
community_global_df_gradio['hf_user_name'] = community_global_df_gradio['hf_user_name'].apply(format_hyperlink)
|
694 |
|
695 |
+
top_num = 30
|
696 |
top_num_exp = community_global_df.nlargest(top_num, 'total_exp')
|
697 |
|
698 |
+
top_num_exp['D'] = ['π₯','π₯','π₯','','','','','','','','','','','','','','','','','','','','','','','','','','','']
|
699 |
top_num_rows = top_num_exp.values.tolist()
|
700 |
|
701 |
#print(top_30_rows)
|