John6666 commited on
Commit
cf5f43b
1 Parent(s): 1f682f8

Upload modutils.py

Browse files
Files changed (1) hide show
  1. modutils.py +2 -2
modutils.py CHANGED
@@ -186,10 +186,10 @@ def get_model_id_list():
186
  try:
187
  models_likes = []
188
  for author in HF_MODEL_USER_LIKES:
189
- models_likes.extend(api.list_models(author=author, cardData=True, sort="likes"))
190
  models_ex = []
191
  for author in HF_MODEL_USER_EX:
192
- models_ex = api.list_models(author=author, cardData=True, sort="last_modified")
193
  except Exception as e:
194
  print(f"Error: Failed to list {author}'s models.")
195
  print(e)
 
186
  try:
187
  models_likes = []
188
  for author in HF_MODEL_USER_LIKES:
189
+ models_likes.extend(api.list_models(author=author, task="text-to-image", cardData=True, sort="likes"))
190
  models_ex = []
191
  for author in HF_MODEL_USER_EX:
192
+ models_ex = api.list_models(author=author, task="text-to-image", cardData=True, sort="last_modified")
193
  except Exception as e:
194
  print(f"Error: Failed to list {author}'s models.")
195
  print(e)