mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-19 04:17:52 +00:00
Fancier [Y/N/B]
Fancier [Y/N/B], does not require for you to press the letter and then enter, and also asks you if you want to download the model instead of downloading it automatically if you don't have it. Pressing B lets you open the link in the browser for a faster download because most browsers support multi-segment downloads. With Invoke-WebRequest it would take me ~30 minutes to download with a 200Mbps speed. Also lets you retry the download if failed or disconnected.
This commit is contained in:
parent
79543b1edf
commit
6af9d54a47
48
install.bat
48
install.bat
@ -125,27 +125,51 @@ if %ERRORLEVEL% neq 0 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo Downloading latest model
|
echo Downloading latest model
|
||||||
IF NOT EXIST models (
|
if not exist models (
|
||||||
md models
|
md models
|
||||||
)
|
)
|
||||||
|
|
||||||
IF NOT EXIST models/gpt4all-lora-quantized-ggml.bin (
|
if not exist models/gpt4all-lora-quantized-ggml.bin (
|
||||||
powershell -Command "Invoke-WebRequest -Uri 'https://the-eye.eu/public/AI/models/nomic-ai/gpt4all/gpt4all-lora-quantized-ggml.bin' -OutFile 'models/gpt4all-lora-quantized-ggml.bin'"
|
echo.
|
||||||
|
choice /C YNB /M "The default model file (gpt4all-lora-quantized-ggml.bin) does not exist. Do you want to download it? Press B to download it with a browser (faster)."
|
||||||
|
if errorlevel 3 goto DOWNLOAD_WITH_BROWSER
|
||||||
|
if errorlevel 2 goto DOWNLOAD_SKIP
|
||||||
|
if errorlevel 1 goto MODEL_DOWNLOAD
|
||||||
) ELSE (
|
) ELSE (
|
||||||
:PROMPT
|
|
||||||
echo.
|
echo.
|
||||||
set /p choice="The model file already exists. Do you want to override it? (y/n) "
|
choice /C YNB /M "The default model file (gpt4all-lora-quantized-ggml.bin) already exists. Do you want to replace it? Press B to download it with a browser (faster)."
|
||||||
if /i {%choice%}=={y} (
|
if errorlevel 3 goto DOWNLOAD_WITH_BROWSER
|
||||||
powershell -Command "Invoke-WebRequest -Uri 'https://the-eye.eu/public/AI/models/nomic-ai/gpt4all/gpt4all-lora-quantized-ggml.bin' -OutFile 'models/gpt4all-lora-quantized-ggml.bin'" && goto :CONTINUE
|
if errorlevel 2 goto DOWNLOAD_SKIP
|
||||||
) else if /i {%choice%}=={n} (
|
if errorlevel 1 goto MODEL_DOWNLOAD
|
||||||
|
)
|
||||||
|
|
||||||
|
:DOWNLOAD_WITH_BROWSER
|
||||||
|
start https://the-eye.eu/public/AI/models/nomic-ai/gpt4all/gpt4all-lora-quantized-ggml.bin
|
||||||
|
echo Link has been opened with the default web browser, make sure to save it into the models folder. Press any key to continue.
|
||||||
|
pause
|
||||||
goto :CONTINUE
|
goto :CONTINUE
|
||||||
) else (
|
|
||||||
|
:MODEL_DOWNLOAD
|
||||||
echo.
|
echo.
|
||||||
echo Invalid input. Please enter 'y' or 'n'.
|
echo Downloading latest model...
|
||||||
goto :PROMPT
|
powershell -Command "Invoke-WebRequest -Uri 'https://the-eye.eu/public/AI/models/nomic-ai/gpt4all/gpt4all-lora-quantized-ggml.bin' -OutFile 'models/gpt4all-lora-quantized-ggml.bin'"
|
||||||
)
|
if errorlevel 1 (
|
||||||
|
echo Failed to download model. Please check your internet connection.
|
||||||
|
choice /C YN /M "Do you want to try downloading again?"
|
||||||
|
if errorlevel 2 goto DOWNLOAD_SKIP
|
||||||
|
if errorlevel 1 goto MODEL_DOWNLOAD
|
||||||
|
) else (
|
||||||
|
echo Model successfully downloaded.
|
||||||
)
|
)
|
||||||
|
goto :CONTINUE
|
||||||
|
|
||||||
|
:DOWNLOAD_SKIP
|
||||||
|
echo.
|
||||||
|
echo Skipping download of model file...
|
||||||
|
goto :CONTINUE
|
||||||
|
|
||||||
:CONTINUE
|
:CONTINUE
|
||||||
|
echo.
|
||||||
|
|
||||||
echo Cleaning tmp folder
|
echo Cleaning tmp folder
|
||||||
rd /s /q "./tmp"
|
rd /s /q "./tmp"
|
||||||
|
Loading…
Reference in New Issue
Block a user