lunarflu HF staff commited on
Commit
b825282
β€’
1 Parent(s): 36082f6

top_num_exp -> 30 (fixed discord leaderboard)

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = 10
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)