Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,22 +58,18 @@ async def give_verified_roles():
|
|
| 58 |
global_df = pd.DataFrame()
|
| 59 |
test_merge = pd.read_csv("https://docs.google.com/spreadsheets/d/1C8aLqgCqLYcMiIFf-P_Aosaa03C_WLIB_UyqvjSdWg8/export?format=csv&gid=0")
|
| 60 |
global_df = test_merge
|
| 61 |
-
print(f"csv successfully retrieved
|
| 62 |
-
print("Starting the give_verified_roles task...")
|
| 63 |
|
| 64 |
-
|
| 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"
|
| 70 |
invite_message = "Click to join our community org on the HF Hub!"
|
| 71 |
-
|
| 72 |
|
| 73 |
# Cache members in the guild
|
| 74 |
-
print("Chunking guild members to cache...")
|
| 75 |
await guild.chunk()
|
| 76 |
-
print("Guild members chunked.")
|
| 77 |
|
| 78 |
# Iterate over the dataframe rows
|
| 79 |
for index, row in global_df.iterrows():
|
|
@@ -95,7 +91,6 @@ async def give_verified_roles():
|
|
| 95 |
)
|
| 96 |
await asyncio.sleep(1)
|
| 97 |
|
| 98 |
-
print("Finished processing all rows.")
|
| 99 |
except Exception as e:
|
| 100 |
print(f"Error encountered: {e}")
|
| 101 |
|
|
|
|
| 58 |
global_df = pd.DataFrame()
|
| 59 |
test_merge = pd.read_csv("https://docs.google.com/spreadsheets/d/1C8aLqgCqLYcMiIFf-P_Aosaa03C_WLIB_UyqvjSdWg8/export?format=csv&gid=0")
|
| 60 |
global_df = test_merge
|
| 61 |
+
print(f"csv successfully retrieved")
|
|
|
|
| 62 |
|
|
|
|
| 63 |
guild = bot.get_guild(879548962464493619)
|
| 64 |
role = guild.get_role(900063512829755413)
|
| 65 |
|
| 66 |
# Define the invite message
|
| 67 |
org_link = "https://huggingface.co/organizations/discord-community/share/wPKRAHYbAlaEaCxUxcqVyaaaeZcYagDvqc"
|
| 68 |
invite_message = "Click to join our community org on the HF Hub!"
|
| 69 |
+
|
| 70 |
|
| 71 |
# Cache members in the guild
|
|
|
|
| 72 |
await guild.chunk()
|
|
|
|
| 73 |
|
| 74 |
# Iterate over the dataframe rows
|
| 75 |
for index, row in global_df.iterrows():
|
|
|
|
| 91 |
)
|
| 92 |
await asyncio.sleep(1)
|
| 93 |
|
|
|
|
| 94 |
except Exception as e:
|
| 95 |
print(f"Error encountered: {e}")
|
| 96 |
|