Closed supergangchao closed 5 months ago
To address the issue where your application is attempting to connect to 'https://huggingface.co' in an offline environment, follow these steps:
Pre-download Required Models: Ensure all necessary models and files are downloaded from 'https://huggingface.co' or any other sources before moving to an offline setup.
Set MODEL_ROOT_PATH
: Define MODEL_ROOT_PATH
in your configuration to the local path where the downloaded models are stored.
Update MODEL_PATH
Dictionary: Modify the MODEL_PATH
dictionary to point to the local paths of the models. For example:
"llm_model": {
"chatglm3-6b": "/path/to/your/local/chatglm3-6b",
}
Disable Online Models: Remove or comment out any references to online models or APIs in your configuration.
Review Your Code: If the issue persists after these steps, review your code for any parts still trying to access 'https://huggingface.co' and adjust accordingly.
For more detailed guidance or if you encounter further issues, consider reviewing similar discussions in the repository's issues section or providing more details about your setup and the steps you've already taken.
再使用miluvs向量数据库,上传文件的是很好提示下面 We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like None is not the path to a directory containing a file named config.json. 目前自己使用的ll模型,embedding 模型和rerank模型都是离线安装的模型,不存再需要调用https://huggingface.co
We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like None is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. 文档切分示例:page_content='392.0\n应收款项减值账务处理' metadata={'source': '/mnt/sdc/Langchain-Chatchat/knowledge_base/kaokao/content/aaa391.xlsx'} Batches: 0%| | 0/3 [00:00<?, ?it/s]We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like None is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. 文档切分示例:page_content='512.0\n股权溢价购入怎么纳税?' metadata={'source': '/mnt/sdc/Langchain-Chatchat/knowledge_base/kaokao/content/aaa511.xlsx'} We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like None is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. 文档切分示例:page_content='482.0\n个人社保费要不要计提?' metadata={'source': '/mnt/sdc/Langchain-Chatchat/knowledge_base/kaokao/content/aaa481.xlsx'} We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like None is not the path to a directory containing a file named config.json.