From 2232bca24b9e51424146907e35c0fefd2f76b115 Mon Sep 17 00:00:00 2001 From: saloui Date: Sun, 14 May 2023 10:35:30 +0200 Subject: [PATCH] removed auto install of model --- webui.bat | 40 ---------------------------------------- webui.sh | 47 +---------------------------------------------- 2 files changed, 1 insertion(+), 86 deletions(-) diff --git a/webui.bat b/webui.bat index 9838ff91..5e50a4db 100644 --- a/webui.bat +++ b/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 diff --git a/webui.sh b/webui.sh index 191812d9..d86d2b25 100644 --- a/webui.sh +++ b/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