How many models!?
Discover how many models are available in Hugging Face for different tasks!
You've been provided with a list of all of the supported Hugging Face tasks, stored in tasks
. You'll iterate over this list, returning all of the models from the Hugging Face API that support this task, and summing the results to find the total number of models.
This exercise is part of the course
Multi-Modal Models with Hugging Face
Exercise instructions
- Use the API (
api
) to find the list of models associated with taskk
. - Print the number of models found after casting the generator returned from the API to a list.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
for k in tasks:
# Find the list of models for task k
models = ____.____(____=____)
# Print the number of models found
print(f"Task: {k}, Models: {____}")