mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-20 04:47:55 +00:00
removed auto install of model
This commit is contained in:
parent
b76474c5f4
commit
2232bca24b
40
webui.bat
40
webui.bat
@ -262,46 +262,6 @@ if not exist \models (
|
||||
md \models
|
||||
)
|
||||
|
||||
dir ".\models\llama_cpp\*.bin" /b 2>&1
|
||||
if errorlevel 1 (
|
||||
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 (
|
||||
echo Model already installed
|
||||
goto CONTINUE
|
||||
)
|
||||
|
||||
:DOWNLOAD_WITH_BROWSER
|
||||
start https://huggingface.co/ParisNeo/GPT4All/resolve/main/gpt4all-lora-quantized-ggml.bin
|
||||
echo Link has been opened with the default web browser, make sure to save it into the models/llama_cpp folder before continuing. Press any key to continue...
|
||||
pause
|
||||
goto :CONTINUE
|
||||
|
||||
:MODEL_DOWNLOAD
|
||||
echo.
|
||||
echo Downloading latest model...
|
||||
set clone_dir=%cd%
|
||||
powershell -Command "Invoke-WebRequest -Uri 'https://huggingface.co/ParisNeo/GPT4All/resolve/main/gpt4all-lora-quantized-ggml.bin' -OutFile %clone_dir%'/models/llama_cpp/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
|
||||
|
||||
:END
|
||||
if exist "./tmp" (
|
||||
echo Cleaning tmp folder
|
||||
|
47
webui.sh
47
webui.sh
@ -110,53 +110,8 @@ if ping -q -c 1 google.com >/dev/null 2>&1; then
|
||||
else
|
||||
echo "is created"
|
||||
fi
|
||||
# Checking model
|
||||
MODEL="./models/llama_cpp/gpt4all-lora-quantized-ggml.bin"
|
||||
MODEL_URL="https://huggingface.co/ParisNeo/GPT4All/resolve/main/gpt4all-lora-quantized-ggml.bin"
|
||||
|
||||
if [ -f "$MODEL" ]; then
|
||||
echo "File $MODEL already exists. Skipping download."
|
||||
else
|
||||
echo "File $MODEL does not exist."
|
||||
echo "What would you like to do?"
|
||||
select option in "Download" "Download using browser" "Skip"; do
|
||||
case $option in
|
||||
Download)
|
||||
if [ -x "$(command -v wget)" ]; then
|
||||
wget "$MODEL_URL" -P ./models/llama_cpp/
|
||||
elif [ -x "$(command -v curl)" ]; then
|
||||
curl -o "$MODEL" "$MODEL_URL"
|
||||
else
|
||||
echo "Error: neither wget nor curl is installed. Please install one of them and try again."
|
||||
exit 1
|
||||
fi
|
||||
break
|
||||
;;
|
||||
"Download using browser")
|
||||
if [ -x "$(command -v xdg-open)" ]; then
|
||||
xdg-open "$MODEL_URL"
|
||||
elif [ -x "$(command -v gnome-open)" ]; then
|
||||
gnome-open "$MODEL_URL"
|
||||
elif [ -x "$(command -v kde-open)" ]; then
|
||||
kde-open "$MODEL_URL"
|
||||
elif [ -x "$(command -v open)" ]; then
|
||||
open "$MODEL_URL"
|
||||
else
|
||||
echo "Error: could not detect a default browser. Please open the link in your web browser manually and press any key to continue."
|
||||
read -n 1 -s -r -p "Press any key to continue"$'\n'
|
||||
fi
|
||||
break
|
||||
;;
|
||||
Skip)
|
||||
echo "Skipping downloading $MODEL"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
echo "Internet connection not available"
|
||||
fi
|
||||
|
||||
# Activate the virtual environment
|
||||
echo -n "Activating virtual environment..."
|
||||
source env/bin/activate
|
||||
|
Loading…
Reference in New Issue
Block a user