mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-19 04:17:52 +00:00
fixed macos code
This commit is contained in:
parent
cf593c7c52
commit
a6c19e8e79
@ -138,6 +138,7 @@ else
|
||||
* ) echo "Skipping download of model file...";;
|
||||
esac
|
||||
fi
|
||||
#!/bin/bash
|
||||
|
||||
echo ""
|
||||
echo "Downloading latest model..."
|
||||
@ -168,7 +169,7 @@ case $yn in
|
||||
echo "[$count] $f"
|
||||
done
|
||||
|
||||
Prompt user to choose a model to convert
|
||||
# Prompt user to choose a model to convert
|
||||
read -p "Enter the number of the model you want to convert: " modelNumber
|
||||
|
||||
if [ -z "${file[modelNumber]}" ]; then
|
||||
@ -182,21 +183,15 @@ case $yn in
|
||||
echo ""
|
||||
echo "You selected $modelPath"
|
||||
|
||||
Ask user if they want to convert the model
|
||||
# Ask user if they want to convert the model
|
||||
echo ""
|
||||
read -p "Do you want to convert the selected model to the new format? (Y/N)" choice
|
||||
|
||||
if [ "$choice" == "N" ]; then
|
||||
echo ""
|
||||
echo "Model conversion cancelled. Skipping..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
The output inside a code tag
|
||||
echo "The code has been converted successfully."
|
||||
esac
|
||||
else
|
||||
# Convert the model
|
||||
echo ""
|
||||
echo "Converting the model to the new format..."
|
||||
if [ ! -d "tmp/llama.cpp" ]; then
|
||||
git clone https://github.com/ggerganov/llama.cpp.git tmp/llama.cpp
|
||||
@ -207,19 +202,18 @@ if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo "Error during model conversion. Restarting..."
|
||||
mv -f "${modelPath}.original" "${modelPath}"
|
||||
goto CONVERT_RESTART
|
||||
exit 1
|
||||
else
|
||||
echo ""
|
||||
echo "The model file (${modelPath}) has been converted to the new format."
|
||||
goto END
|
||||
fi
|
||||
|
||||
:CANCEL_CONVERSION
|
||||
echo ""
|
||||
fi
|
||||
;;
|
||||
* ) echo ""
|
||||
echo "Conversion cancelled. Skipping..."
|
||||
goto END
|
||||
;;
|
||||
esac
|
||||
|
||||
:END
|
||||
echo ""
|
||||
echo "Cleaning tmp folder"
|
||||
rm -rf "./tmp"
|
||||
|
Loading…
Reference in New Issue
Block a user