LLM Alignment and Safety Toolkit
not supported yet
not supported yet
- [Optinal] Install conda if you want to keep your system clean. Then create a conda environment.
conda create -n last python=3.8
conda activate last
create a .env file in the root directory of the project and add the following variables
DATABASE_URL=sqlite://dashboard/app.sqlite3
REDIS_URL=redis://localhost:6379/0
then go to the project directory and run the following commands
poetry install && make compile
poetry run python dashboard/app.py
If this is the first time you run the dashboard, you need to create an admin user by visiting http://127.0.0.1:8000/admin/init
For more detail, checkout Dockfile and docker-compose.yml in case I miss something.
当需要使用中文时,使用from last.services.i18n import _
代替_
,并在需要翻译的字符串前加上_
,例如:
from last.services.i18n import _
label = _('label')
之后,使用make babel
提取需要翻译的字符串,文件存储在last/services/locales/zh_CN/LC_MESSAGES/messages.po
。
修改完成后,使用make compile
编译翻译文件。