Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -61,17 +61,9 @@ async def give_verified_roles():
|
|
61 |
try:
|
62 |
print("Starting the give_verified_roles task...")
|
63 |
|
64 |
-
# Access the global dataframe
|
65 |
global global_df
|
66 |
-
print(f"Dataframe loaded with {len(global_df)} rows.")
|
67 |
-
|
68 |
-
# Get the guild (server)
|
69 |
guild = bot.get_guild(879548962464493619)
|
70 |
-
print(f"Guild found: {guild}")
|
71 |
-
|
72 |
-
# Get the role
|
73 |
role = guild.get_role(900063512829755413)
|
74 |
-
print(f"Role found: {role}")
|
75 |
|
76 |
# Define the invite message
|
77 |
org_link = "https://huggingface.co/organizations/discord-community/share/wPKRAHYbAlaEaCxUxcqVyaaaeZcYagDvqc"
|
@@ -85,8 +77,6 @@ async def give_verified_roles():
|
|
85 |
|
86 |
# Iterate over the dataframe rows
|
87 |
for index, row in global_df.iterrows():
|
88 |
-
print(f"Processing row {index}: {row}")
|
89 |
-
|
90 |
# Extract Hugging Face username
|
91 |
hf_user_name = row['hf_user_name']
|
92 |
if pd.notna(hf_user_name) and hf_user_name.lower() != 'n/a':
|
|
|
61 |
try:
|
62 |
print("Starting the give_verified_roles task...")
|
63 |
|
|
|
64 |
global global_df
|
|
|
|
|
|
|
65 |
guild = bot.get_guild(879548962464493619)
|
|
|
|
|
|
|
66 |
role = guild.get_role(900063512829755413)
|
|
|
67 |
|
68 |
# Define the invite message
|
69 |
org_link = "https://huggingface.co/organizations/discord-community/share/wPKRAHYbAlaEaCxUxcqVyaaaeZcYagDvqc"
|
|
|
77 |
|
78 |
# Iterate over the dataframe rows
|
79 |
for index, row in global_df.iterrows():
|
|
|
|
|
80 |
# Extract Hugging Face username
|
81 |
hf_user_name = row['hf_user_name']
|
82 |
if pd.notna(hf_user_name) and hf_user_name.lower() != 'n/a':
|