punkt / README.md
kailinjiang's picture
Create README.md
fd9a21c verified
|
raw
history blame
1.03 kB
## 🛠️ Requirements and Installation
```text
# clone ICE
git clone https://github.com/Yofuria/ICE.git
cd ICE
# create conda env
conda create -n ICE python=3.10
conda activate ICE
# install package
pip install -r requirements.txt
```
In **lines 32 and 33** of **` examples/run_knowedit_llama2.py`**, you need to download the **` punkt `** package.
- If your Internet **speed is fast** enough, you can **run the code directly** from the command line.
```text
if __name__ == "__main__":
# If you have a slow Internet connection and can't download nltk quickly, comment these two lines and use the second method of Requirements and Installation in README.md
import nltk
nltk.download('punkt')
```
- If your Internet **speed is slow**, **comment lines 32 and 33** and download punkt manually. And place it in the ICE environment directory you created, create a **nltk_data/tokenizers** folder, and **unpack punkt** into this directory.
<div align="center"> <img src="assets/punkt.png" width="650px"> </div>