# credit to Stack Overflow user in source link import os os.environ['TRANSFORMERS_CACHE'] = '/set/your/path/here'