lunarflu HF staff commited on
Commit
9c4f5bf
·
verified ·
1 Parent(s): 3c2c20a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py CHANGED
@@ -45,7 +45,6 @@ gspread_bot = gspread.service_account(filename='service_account.json')
45
  worksheet2 = gspread_bot.open("hf_discord_verified_users_test").sheet1
46
  """"""
47
  bot_ids = [1136614989411655780, 1166392942387265536, 1158038249835610123, 1130774761031610388, 1155489509518098565, 1155169841276260546, 1152238037355474964, 1154395078735953930]
48
- guild = bot.get_guild(879548962464493619)
49
  """"""
50
  api = HfApi()
51
  """"""
@@ -337,17 +336,6 @@ async def xp_help(ctx):
337
  print(f"on_message Error: {e}")
338
 
339
 
340
- async def get_guild_info(dataframe1):
341
- guild = bot.get_guild(879548962464493619)
342
- # removing huggingfolks, display community members instead
343
- for index, row in dataframe1.iterrows():
344
- user_id = int(row['discord_user_id'])
345
- print(guild)
346
- member = guild.get_member(user_id)
347
- if member is not None and discord.utils.get(member.roles, id=role_id_to_check) is not None:
348
- dataframe1.drop(index, inplace=True)
349
- return dataframe1
350
-
351
 
352
  # embeds with user pfps?
353
  # name, pfp, time in server....
@@ -398,11 +386,7 @@ def get_data():
398
  demo = gr.Blocks()
399
  with demo:
400
  try:
401
- role_id = 897376942817419265 # huggingfolks
402
  dataframe1 = pd.read_csv(csv_url)
403
-
404
- dataframe1 = await(get_guild_info(dataframe1))
405
-
406
  column_values_unique = sorted(dataframe1.iloc[:, 3].unique())
407
  dataframe2 = pd.DataFrame({'Levels': column_values_unique})
408
  counts = {}
@@ -440,4 +424,3 @@ with demo:
440
  demo.queue().launch()
441
 
442
 
443
-
 
45
  worksheet2 = gspread_bot.open("hf_discord_verified_users_test").sheet1
46
  """"""
47
  bot_ids = [1136614989411655780, 1166392942387265536, 1158038249835610123, 1130774761031610388, 1155489509518098565, 1155169841276260546, 1152238037355474964, 1154395078735953930]
 
48
  """"""
49
  api = HfApi()
50
  """"""
 
336
  print(f"on_message Error: {e}")
337
 
338
 
 
 
 
 
 
 
 
 
 
 
 
339
 
340
  # embeds with user pfps?
341
  # name, pfp, time in server....
 
386
  demo = gr.Blocks()
387
  with demo:
388
  try:
 
389
  dataframe1 = pd.read_csv(csv_url)
 
 
 
390
  column_values_unique = sorted(dataframe1.iloc[:, 3].unique())
391
  dataframe2 = pd.DataFrame({'Levels': column_values_unique})
392
  counts = {}
 
424
  demo.queue().launch()
425
 
426