victor HF staff multimodalart HF staff commited on
Commit
6acb5d0
1 Parent(s): 28f1592

Add sort by likesRecent to improve discoverability (#1)

Browse files

- Add sort by likesRecent to improve discoverability (190136db8010ed1bb0a3146ce44478760d8ed27e)


Co-authored-by: Multimodal AI art <multimodalart@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ async def upload_resize_image_url(session, image_url):
66
 
67
  def fetch_models(page=0):
68
  response = requests.get(
69
- f'https://huggingface.co/models-json?pipeline_tag=text-to-image&p={page}')
70
  data = response.json()
71
  return {
72
  "models": [model for model in data['models'] if not model['private']],
 
66
 
67
  def fetch_models(page=0):
68
  response = requests.get(
69
+ f'https://huggingface.co/models-json?pipeline_tag=text-to-image&sort=likesRecent&p={page}')
70
  data = response.json()
71
  return {
72
  "models": [model for model in data['models'] if not model['private']],