11 Download model from github and save to cache directory.
14 model_file (str): The name of the model (with file extension).
15 path_in_repo (str): Path to the directory with model in repo.
18 str: The full path to the model file.
20 cache_dir = os.path.join(os.path.expanduser(
"~"),
".emotiefflib")
21 os.makedirs(cache_dir, exist_ok=
True)
22 fpath = os.path.join(cache_dir, model_file)
23 if not os.path.isfile(fpath):
25 "https://github.com/sb-ai-lab/EmotiEffLib/blob/main/"
30 print(
"Downloading", model_file,
"from", url)
31 urllib.request.urlretrieve(url, fpath)