Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix
Browse files
app.py
CHANGED
@@ -618,14 +618,17 @@ def _remove_huggingfolks_sync(members_with_role):
|
|
618 |
reorder = ['discord_user_id', 'hf_user_name', 'discord_exp', 'discord_level', 'discord_user_name', 'hub_exp', 'total_exp', 'verified_date']
|
619 |
community_global_df = community_global_df[reorder]
|
620 |
|
621 |
-
|
622 |
-
community_global_df.drop(columns=
|
623 |
-
|
624 |
-
community_global_df.
|
625 |
-
|
|
|
|
|
|
|
626 |
community_global_df['total_exp'] = community_global_df['total_exp'].str.strip('L').astype(int)
|
627 |
community_global_df['total_exp'] = pd.to_numeric(community_global_df['total_exp'], errors='coerce').fillna(0).astype(int)
|
628 |
-
community_global_df.
|
629 |
|
630 |
community_global_df_gradio = community_global_df.copy()
|
631 |
community_global_df_gradio['hf_user_name'] = community_global_df_gradio['hf_user_name'].apply(format_hyperlink)
|
|
|
618 |
reorder = ['discord_user_id', 'hf_user_name', 'discord_exp', 'discord_level', 'discord_user_name', 'hub_exp', 'total_exp', 'verified_date']
|
619 |
community_global_df = community_global_df[reorder]
|
620 |
|
621 |
+
community_global_df.drop(community_global_df.columns[0], axis=1, inplace=True)
|
622 |
+
community_global_df.drop(community_global_df.columns[1], axis=1, inplace=True)
|
623 |
+
community_global_df.drop(community_global_df.columns[2], axis=1, inplace=True)
|
624 |
+
community_global_df.drop(community_global_df.columns[2], axis=1, inplace=True)
|
625 |
+
community_global_df.drop(community_global_df.columns[3], axis=1, inplace=True)
|
626 |
+
|
627 |
+
# drop rows (records) where hf_user_name does not exist (we display only verified users)
|
628 |
+
community_global_df = community_global_df.dropna(subset=['hf_user_name'])
|
629 |
community_global_df['total_exp'] = community_global_df['total_exp'].str.strip('L').astype(int)
|
630 |
community_global_df['total_exp'] = pd.to_numeric(community_global_df['total_exp'], errors='coerce').fillna(0).astype(int)
|
631 |
+
community_global_df = community_global_df.nlargest(len(community_global_df), 'total_exp')
|
632 |
|
633 |
community_global_df_gradio = community_global_df.copy()
|
634 |
community_global_df_gradio['hf_user_name'] = community_global_df_gradio['hf_user_name'].apply(format_hyperlink)
|