当前位置:   article > 正文

chatglm_langchain

kaggle 运行langchain
  1. #Setup envirnment
  2. !conda create -n langchain python=3.8.1 -y
  3. !conda activate langchain
  4. # 拉取仓库
  5. #!git clone https://github.com/imClumsyPanda/langchain-ChatGLM.git
  6. !cp -r /kaggle/input/langchain-chatglm/ /kaggle/working/langchain-ChatGLM
  7. # 安装依赖
  8. %cd /kaggle/working/langchain-ChatGLM
  9. !/opt/conda/envs/langchain/bin/python3 -m pip install -r requirements.txt
  10. !/opt/conda/envs/langchain/bin/python3 -m pip install gradio==3.28.3
  11. !/opt/conda/envs/langchain/bin/python3 -m pip install tabulate
  12. #Download models
  13. !git lfs install
  14. %cd /kaggle/working/langchain-ChatGLM
  15. !git clone https://huggingface.co/THUDM/chatglm-6b-int4
  16. !git clone https://huggingface.co/GanymedeNil/text2vec-large-chinese
  17. %cd /kaggle/working/langchain-ChatGLM
  18. !/opt/conda/envs/langchain/bin/python3 webui.py
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/333014
推荐阅读
  

闽ICP备14008679号