07. (HuggingFace Local)

# Library for loading token information
# installation: pip install python-dotenv
from dotenv import load_dotenv

# Load token information
load_dotenv()
True
# LangSmith Set up tracking. https://smith.langchain.com
# !pip install langchain-teddynote
from langchain_teddynote import logging

# Enter a project name.
logging.langsmith("CH04-Models")
LangSmith Start tracking.
[Project name]
CH04-Models

Set the path to download the model

# Path to download the hugging face model/tokenizer
# (example)

import os

# ./cache/ Set to download to path
os.environ["TRANSFORMERS_CACHE"] = "./cache/"
os.environ["HF_HOME"] = "./cache/"

repo_id In variables HuggingFace model's repo ID( repository ID) Assigns.

Last updated