import huggingface_hub
download_path = huggingface_hub.snapshot_download(
repo_id=model_name,
local_dir=dir_path
)
model = BertModel.from_pretrained(model_name, cache_dir=dir_path)
import huggingface_hub
download_path = huggingface_hub.snapshot_download(
repo_id=model_name,
local_dir=dir_path
)
model = BertModel.from_pretrained(model_name, cache_dir=dir_path)