ai - python代码中使用 国内镜像 hugging-face mirror hf-mirror.com
访问量: 11
refer to:
set HF_ENDPOINT=https://hf-mirror.com
然后再运行
或者代码中:
import os os.environ["HF_ENDPOINT"] = "https://hf-mirror.com" from llama_index.core import SimpleDirectoryReader, VectorStoreIndex, Settings from llama_index.embeddings.huggingface import HuggingFaceEmbedding
如果要在命令行中指定,则需要:
1. 进入到cmd
2. set HF_ENDPOINT=https://hf-mirror.com
3. 正常运行。
