Spaces:
Sleeping
Sleeping
| title: Intern LlamaIndex | |
| emoji: ⚡ | |
| colorFrom: green | |
| colorTo: green | |
| sdk: streamlit | |
| sdk_version: 1.40.1 | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference | |
| ## Installation of dependencies | |
| ### Sentence Transformer | |
| ```Bash | |
| touch download_hf.py | |
| ``` | |
| download_hf.py | |
| ```python | |
| import os | |
| # 设置环境变量 | |
| os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' | |
| # 下载模型 | |
| os.system('huggingface-cli download --resume-download sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 --local-dir /root/model/sentence-transformer') | |
| ``` | |
| download | |
| ```shell | |
| python download_hf.py | |
| ``` | |
| ### paraphrase-multilingual-MiniLM-L12-v2 | |
| ```shell | |
| mkdir /root/model | |
| git lfs install | |
| git clone https://www.modelscope.cn/Ceceliachenen/paraphrase-multilingual-MiniLM-L12-v2.git | |
| ``` | |
| ### NLTK | |
| ```shell | |
| cd /root | |
| git clone https://gitee.com/yzy0612/nltk_data.git --branch gh-pages | |
| cd nltk_data | |
| mv packages/* ./ | |
| cd tokenizers | |
| unzip punkt.zip | |
| cd ../taggers | |
| unzip averaged_perceptron_tagger.zip | |
| ``` |