Rely on huggingface_hub for common tools (#13100)

* Remove hf_api module and use hugginface_hub

* Style

* Fix to test_fetcher

* Quality
This commit is contained in:
Sylvain Gugger
2021-08-12 14:59:02 +02:00
committed by GitHub
parent 6900dded49
commit 9a498c37a2
8 changed files with 54 additions and 434 deletions

View File

@@ -103,8 +103,8 @@ Here is the code to see all available pretrained models on the hub:
.. code-block:: python
from transformers.hf_api import HfApi
model_list = HfApi().model_list()
from huggingface_hub.hf_api import HfApi
model_list = HfApi().list_models()
org = "Helsinki-NLP"
model_ids = [x.modelId for x in model_list if x.modelId.startswith(org)]
suffix = [x.split('/')[1] for x in model_ids]