📜  huggingface 默认缓存目录 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:55.981000             🧑  作者: Mango

代码示例1
""" DO THIS **BEFORE** IMPORTING transformers """

# INSIDE SCRIPT
import os
os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/'

# FROM BASH
# export TRANSFORMERS_CACHE=/blabla/cache/

""" Use variable HF_HOME instead for the library datasets """