mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-06 10:59:23 +00:00
Changed Git and Conversion
Changed the Git install so it doesn't exit if you pressed no if you already had it installed. Changed the conversion: It asks to convert a model. If user agrees, it converts using Python. If not, it skips. On conversion failure, it reverts to original model. Removed some testing pauses and added some echo. for easier readability.
This commit is contained in:
parent
b87009d2f7
commit
6a77f83dd2
@ -41,6 +41,7 @@ REM Check if Python is installed
|
|||||||
set /p="Checking for python..." <nul
|
set /p="Checking for python..." <nul
|
||||||
where python >nul 2>&1
|
where python >nul 2>&1
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
|
echo.
|
||||||
set /p choice=Python is not installed. Would you like to install Python? [Y/N]
|
set /p choice=Python is not installed. Would you like to install Python? [Y/N]
|
||||||
if /i ".choice." equ "Y" (
|
if /i ".choice." equ "Y" (
|
||||||
REM Download Python installer
|
REM Download Python installer
|
||||||
@ -63,6 +64,7 @@ REM Check if pip is installed
|
|||||||
set /p="Checking for pip..." <nul
|
set /p="Checking for pip..." <nul
|
||||||
python -m pip >nul 2>&1
|
python -m pip >nul 2>&1
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
|
echo.
|
||||||
set /p choice=Pip is not installed. Would you like to install pip? [Y/N]
|
set /p choice=Pip is not installed. Would you like to install pip? [Y/N]
|
||||||
if /i ".choice." equ "Y" (
|
if /i ".choice." equ "Y" (
|
||||||
REM Download get-pip.py
|
REM Download get-pip.py
|
||||||
@ -84,6 +86,7 @@ REM Check if venv module is available
|
|||||||
set /p="Checking for venv..." <nul
|
set /p="Checking for venv..." <nul
|
||||||
python -c "import venv" >nul 2>&1
|
python -c "import venv" >nul 2>&1
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
|
echo.
|
||||||
set /p choice=venv module is not available. Would you like to upgrade Python to the latest version? [Y/N]
|
set /p choice=venv module is not available. Would you like to upgrade Python to the latest version? [Y/N]
|
||||||
if /i ".choice." equ "Y" (
|
if /i ".choice." equ "Y" (
|
||||||
REM Upgrade Python
|
REM Upgrade Python
|
||||||
@ -169,7 +172,6 @@ echo Skipping download of model file...
|
|||||||
goto :CONTINUE
|
goto :CONTINUE
|
||||||
|
|
||||||
:CONTINUE
|
:CONTINUE
|
||||||
echo.
|
|
||||||
|
|
||||||
REM Install Git
|
REM Install Git
|
||||||
echo.
|
echo.
|
||||||
@ -186,10 +188,8 @@ REM Install Git
|
|||||||
echo "Checking for git..."
|
echo "Checking for git..."
|
||||||
where git >nul 2>&1
|
where git >nul 2>&1
|
||||||
if %ERRORLEVEL% EQU 0 (
|
if %ERRORLEVEL% EQU 0 (
|
||||||
echo.
|
|
||||||
echo "Git is installed."
|
echo "Git is installed."
|
||||||
) else (
|
) else (
|
||||||
echo.
|
|
||||||
echo "Git is not installed. Installing Git..."
|
echo "Git is not installed. Installing Git..."
|
||||||
powershell.exe -Command "Start-Process https://git-scm.com/download/win -Wait"
|
powershell.exe -Command "Start-Process https://git-scm.com/download/win -Wait"
|
||||||
)
|
)
|
||||||
@ -198,6 +198,7 @@ if %ERRORLEVEL% EQU 0 (
|
|||||||
REM This code lists all files in the ./models folder and asks the user to choose one to convert.
|
REM This code lists all files in the ./models folder and asks the user to choose one to convert.
|
||||||
REM If the user agrees, it converts using Python. If not, it skips. On conversion failure, it reverts to original model.
|
REM If the user agrees, it converts using Python. If not, it skips. On conversion failure, it reverts to original model.
|
||||||
:CONVERT_RESTART
|
:CONVERT_RESTART
|
||||||
|
echo.
|
||||||
choice /C YN /M "In order to make a model work, it needs to go through the LLaMA tokenizer, this will fix errors with the model in run.bat. Do you want to convert the model?"
|
choice /C YN /M "In order to make a model work, it needs to go through the LLaMA tokenizer, this will fix errors with the model in run.bat. Do you want to convert the model?"
|
||||||
if errorlevel 2 goto CANCEL_CONVERSION
|
if errorlevel 2 goto CANCEL_CONVERSION
|
||||||
if errorlevel 1 goto CONVERT_START
|
if errorlevel 1 goto CONVERT_START
|
||||||
@ -226,6 +227,7 @@ set "modelPath=!file[%modelNumber%]!"
|
|||||||
echo.
|
echo.
|
||||||
echo You selected !modelPath!
|
echo You selected !modelPath!
|
||||||
REM Ask user if they want to convert the model
|
REM Ask user if they want to convert the model
|
||||||
|
echo.
|
||||||
choice /C YN /M "Do you want to convert the selected model to the new format?"
|
choice /C YN /M "Do you want to convert the selected model to the new format?"
|
||||||
if errorlevel 2 (
|
if errorlevel 2 (
|
||||||
echo.
|
echo.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user