Skip to content

Commit

Permalink
[tokenizer] Update import script for huggingface_hub api change (#2850)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu committed Apr 26, 2024
1 parent 052fc3f commit 13df6ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extensions/tokenizers/src/main/python/huggingface_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from argparse import Namespace
from typing import List

from huggingface_hub import HfApi, ModelSearchArguments
from huggingface_hub import HfApi
from huggingface_hub import hf_hub_download
from huggingface_hub.hf_api import ModelInfo

Expand All @@ -27,7 +27,7 @@
"ForMultipleChoice": "text-classification",
"ForMaskedLM": "fill-mask",
}
LANGUAGES = ModelSearchArguments().language
LANGUAGES = HfApi().get_model_tags()["language"]


def get_lang_tags(model_info):
Expand Down
2 changes: 1 addition & 1 deletion extensions/tokenizers/src/main/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
huggingface_hub
transformers
torch==1.11.0
torch
protobuf==3.20.2

0 comments on commit 13df6ea

Please sign in to comment.