|
@echo off |
|
echo Opening NeuroGPT endpoint... |
|
|
|
echo Checking for updates... |
|
|
|
copy /Y config.json config_temp.json |
|
git checkout main |
|
git fetch --all |
|
git reset --hard origin/main |
|
git pull |
|
|
|
copy /Y config_temp.json config.json |
|
del config_temp.json |
|
|
|
|
|
python -c "import sys; print('.'.join(map(str, sys.version_info[:3])))" > version.txt |
|
set /p version=<version.txt |
|
IF "%version%" LSS "3.10.0" ( |
|
echo Your version of Python %version% is not supported. Please install Python 3.10 |
|
pause |
|
) |
|
IF "%version%" GEQ "3.10.14" ( |
|
echo Your version of Python %version% is not supported. Please install Python 3.10 |
|
pause |
|
) |
|
|
|
python -m venv venv |
|
call venv\Scripts\activate.bat |
|
python -m pip install --upgrade pip |
|
python -m pip install -U setuptools |
|
python -m pip install whl\fastwsgi-0.0.9-cp310-cp310-win_amd64.whl |
|
python -m pip install -r requirements.txt |
|
|
|
|
|
IF NOT EXIST venv\Lib\site-packages\en_core_web_sm ( |
|
echo English language model not found, downloading... |
|
python -m spacy download en_core_web_sm |
|
) |
|
|
|
IF NOT EXIST venv\Lib\site-packages\zh_core_web_sm ( |
|
echo Chinese language model not found, downloading... |
|
python -m spacy download zh_core_web_sm |
|
) |
|
|
|
IF NOT EXIST venv\Lib\site-packages\ru_core_news_sm ( |
|
echo Russian language model not found, downloading... |
|
python -m spacy download ru_core_news_sm |
|
) |
|
|
|
echo Completed. |
|
echo Running NeuroGPT... |
|
|
|
python endpoint.py |
|
pause |