Spaces:
Running on CPU Upgrade

lunarflu HF staff commited on
Commit
172ae87
·
1 Parent(s): bace1a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -72,13 +72,16 @@ async def add_exp_hub(ctx):
72
  for value in column_values:
73
  row_number = column_values.index(value) + 1
74
  hf_user_name = value
75
- # check likes
76
- try:
77
- likes = list_liked_repos(f"{hf_user_name}")
78
- hf_likes_new = likes.total
79
- worksheet2.update(f'G{row_number}', f'{hf_likes_new}')
80
- except Exception as e:
81
- print(f"add_exp_hub Error: {e}")
 
 
 
82
  except Exception as e:
83
  print(f"add_exp_hub Error: {e}")
84
 
 
72
  for value in column_values:
73
  row_number = column_values.index(value) + 1
74
  hf_user_name = value
75
+ val = worksheet.acell(f'G{row_number}').value
76
+ if val == '':
77
+ # check likes
78
+ try:
79
+ likes = list_liked_repos(f"{hf_user_name}")
80
+ hf_likes_new = likes.total
81
+ worksheet2.update(f'G{row_number}', f'{hf_likes_new}')
82
+ except Exception as e:
83
+ print(f"add_exp_hub Error: {e}")
84
+
85
  except Exception as e:
86
  print(f"add_exp_hub Error: {e}")
87