|
#!/bin/bash |
|
|
|
|
|
sudo apt-get update -y |
|
|
|
|
|
sudo apt-get install -y python3-full python3-venv python3-pip python-is-python3 git build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev |
|
|
|
|
|
git clone https://github.com/Em1tSan/NeuroGPT.git |
|
cd NeuroGPT |
|
|
|
|
|
git checkout main |
|
git fetch --all |
|
git reset --hard origin/main |
|
git pull |
|
|
|
|
|
version=$(python3 --version) |
|
version=${version:7} |
|
if [[ "$version" < "3.9.0" ]]; then |
|
echo "Your version of Python ${version} is not supported. Please install Python 3.10.X" |
|
exit 1 |
|
elif [[ "$version" > "3.11.14" ]]; then |
|
echo "Your version of Python ${version} is not supported. Please install Python 3.10.X" |
|
exit 1 |
|
fi |
|
|
|
|
|
python3 -m venv venv |
|
. venv/bin/activate |
|
|
|
|
|
python3 -m pip install --upgrade pip |
|
python3 -m pip install -U setuptools |
|
python3 -m pip install -r requirements.txt |
|
|
|
|
|
if [ ! -d "venv/lib/python3.10/site-packages/en_core_web_sm" ]; then |
|
echo "English language model not found, downloading..." |
|
python3 -m spacy download en_core_web_sm |
|
fi |
|
|
|
if [ ! -d "venv/lib/python3.10/site-packages/zh_core_web_sm" ]; then |
|
echo "Chinese language model not found, downloading..." |
|
python3 -m spacy download zh_core_web_sm |
|
fi |
|
|
|
if [ ! -d "venv/lib/python3.10/site-packages/ru_core_news_sm" ]; then |
|
echo "Russian language model not found, downloading..." |
|
python3 -m spacy download ru_core_news_sm |
|
fi |
|
|
|
echo "Completed." |
|
|
|
|
|
language=$(locale | grep LANG= | cut -d "=" -f2 | cut -d "_" -f1) |
|
if [ "$language" = "ru" ]; then |
|
python3 webui_ru.py |
|
else |
|
python3 webui_en.py |
|
fi |