-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hfapi.list_models() support list the top K trending models for TGI/TEI/Diffusion models #2427
Comments
Hi @weigary, yes this is already possible. The from huggingface_hub import HfApi
api = HfApi()
print("id, likes, downloads")
for model in api.list_models(filter="text-generation-inference", sort="likes7d", limit=5):
print(model.id, model.likes, model.downloads) which outputs:
Let me know if you have any further questions, otherwise feel free to close this issue 🤗 |
Thanks @Wauplin ! So IIUC the trending models is sorted by "likes7d"? Thanks a lot! |
Hi @Wauplin in the |
Hi @weigary, there is no way to search only for gated or non-gated models. You'll have to make your search and then filter out manually based on the Is it ok to close this issue given the initial issue has been resolved? :) |
thanks @Wauplin. Is it possible to add the additional filter ( |
Hi @weigary, I opened an internal ticket to track your feature request. I will let you know if and when it's implemented server-side. In the meantime, you can rely on the client-side filtering :) |
Hi @weigary, happy to let you know that it's not possible to filter by "gated" status :)
|
Thanks @Wauplin for the quick action! Much appreciated!! |
Is your feature request related to a problem? Please describe.
We are integrating with HF to get the top K TGI/TEI models and generate the deployment settings for these models. We need to have a way to get the top K trending models. Now it seems the only way is to use a crawler to crawl the page
https://huggingface.co/models-json?sort=trending&p=1&other=text-generation-inference
, which is not very reliable and inconvenient.Describe the solution you'd like
Can we add a
sort=trending
option in this API, so that we can list all the models sorted by trending?Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: