Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tokenizer] Update import script for huggingface_hub api change #2850

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading