List all tasks from hfapi
Is it possible to list all tasks from hfapi like object detection etc.And then search for the top 50 downloaded models for each task? thanks
2024-01-12T10:01:22Z
Hi@Rodas96, I don’t think there is a built-in way to to list all tasks usingHfApi. However, you can callhttps://huggingface.co/api/taskswhich is the JSON equivalent of this page (Tasks - Hugging Face) on which we maintain a list of tasks with documentation, examples and suggested models for each task.Once you’ve retrieved this list of tasks, you can search for the top downloaded models usinglist_models. The output is a generator looping through the models returned by the server.from huggingface_hub import list_models

for model in list_models(limit=10, sort="downloads", direction=-1, filter="object-detection"):
    print(model.id, model.downloads)microsoft/table-transformer-detection 1132061
microsoft/table-transformer-structure-recognition 842637
facebook/detr-resnet-50 463835
hustvl/yolos-tiny 260857
facebook/detr-resnet-101 135484
TahaDouaji/detr-doc-table-detection 86751
hustvl/yolos-small 71631
microsoft/table-transformer-structure-recognition-v1.1-all 59846
fcakyon/yolov5s-v7.0 34056
keremberke/yolov5n-license-plate 28780
2024-01-15T13:10:59Z
tyvm@Wauplin
2024-01-16T01:11:30Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.