Hugging Face, End to EndLesson 8 of 75

Module 1 · The Hub, read properly

Ask the Hub questions instead of browsing it

In this lesson

  • 9 min read
  • 4 reading sections
  • Knowledge check
  • Lesson 8 of 9 in this chapter

This chapter’s goalFind a model using filters or the Python API, inspect the files at a known revision, identify the architecture, weights and any custom loading code, and explain what the download counter can and cannot tell you.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableWatch3:05
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

Ask the Hub for information before downloading a model

The website and the Hub API both expose information about repositories. In this lesson, start with read-only requests. They list models and inspect files without running model code or downloading weights. The current HfApi reference documents the Python names used below. Run the examples in a Python environment with a current huggingface_hub installed.

List models with a few filters

Python
from huggingface_hub import HfApi

api = HfApi(token=False)
models = api.list_models(
    pipeline_tag="automatic-speech-recognition",
    filter=("transformers", "hi"),
    sort="downloads",
    limit=20,
    cardData=True,
)
for model in models:
    card = model.card_data
    licence = card.license if card and card.license else "not listed"
    print(model.id, model.downloads, licence)

The task, library and language tags narrow the results. They do not show which model handles your audio well. The download count is a recent activity measure, not an accuracy score. A missing licence field does not give permission. Read the model card and licence terms before using a model.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Image Generation, in Practice exam.

Stuck on something?Ask Arjun, your AI tutor

How to cite: Addaly (2026) ‘Ask the Hub questions instead of browsing it’, in Hugging Face, End to End. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/hugging-face/the-hub-api (Accessed: 29 November 2026).