upgraded environments

This commit is contained in:
Saifeddine ALOUI 2024-01-11 23:14:30 +01:00
parent 674afc9593
commit 3540a83145
13 changed files with 66 additions and 139 deletions

View File

@ -98,3 +98,4 @@ pdf_latex_path: null
positive_boost: null
negative_boost: null
force_output_language_to_be: null
fun_mode: False

View File

@ -88,7 +88,7 @@ async def text2Audio(request: Request):
if voice!="main_voice":
voices_folder = lollmsElfServer.lollms_paths.custom_voices_path
else:
voices_folder = Path(__file__).parent/"voices"
voices_folder = Path(__file__).parent.parent/"voices"
lollmsElfServer.tts.set_speaker_folder(voices_folder)
url = f"audio/{output_fn}"
preprocessed_text= add_period(data['text'])

@ -1 +1 @@
Subproject commit a5388d595190c79b0ee6057e4eea1e6135f7d8e8
Subproject commit 9aa7dbc1f33432b6e38deb54db2bd2b03b0a477d

View File

@ -21,17 +21,23 @@ CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
miniconda_folder="./installer_files"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
if [ -e "$miniconda_folder" ]; then
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
MINICONDA_CMD="$MINICONDA_DIR/bin/activate"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
else
INSTALL_ENV_DIR="lollms"
MINICONDA_CMD="conda activate"
fi
source "$MINICONDA_DIR/bin/activate" "$INSTALL_ENV_DIR"
source "$MINICONDA_CMD" "$INSTALL_ENV_DIR"
read -rp "Conda environment activated"

View File

@ -134,11 +134,6 @@ else
cp scripts/linux/linux_run.sh ../
fi
if [[ -e "../linux_update.sh" ]]; then
echo "Linux update found"
else
cp scripts/linux/linux_update.sh ../
fi
if [[ -e "../linux_conda_session.sh" ]]; then
echo "Linux update found"
@ -146,12 +141,6 @@ else
cp scripts/linux/linux_conda_session.sh ../
fi
if [[ -e "../linux_update_models.sh" ]]; then
echo "Linux update found"
else
cp scripts/linux/linux_update_models.sh ../
fi
# cd scripts/python/lollms_installer
# python main.py

View File

@ -67,8 +67,6 @@ else
cd utilities/safe_store
pip install -e .
cd ../..
cd lollms-webui || exit 1
fi
# Loop through each "git+" requirement and uninstall it (workaround for inconsistent git package updating)
@ -82,6 +80,21 @@ done < requirements.txt
# Install the pip requirements
python -m pip install -r requirements.txt --upgrade
if [[ -e "../linux_run.sh" ]]; then
echo "Linux run found"
else
pwd
cp scripts/linux/linux_run.sh ../
fi
if [[ -e "../linux_conda_session.sh" ]]; then
echo "Linux update found"
else
pwd
cp scripts/linux/linux_conda_session.sh ../
fi
# cd scripts/python/lollms_installer
# python main.py

View File

@ -21,17 +21,23 @@ CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
miniconda_folder="./installer_files"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
if [ -e "$miniconda_folder" ]; then
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
MINICONDA_CMD="$MINICONDA_DIR/bin/activate"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
else
INSTALL_ENV_DIR="lollms"
MINICONDA_CMD="conda activate"
fi
source "$MINICONDA_DIR/bin/activate" "$INSTALL_ENV_DIR"
source "$MINICONDA_CMD" "$INSTALL_ENV_DIR"
cd lollms-webui
# set default cuda toolkit to the one in the environment

View File

@ -1,43 +0,0 @@
#!/bin/bash
echo Starting LOLLMS Web UI...
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo " By ParisNeo"
cd "$(dirname "$0")"
# better isolation for virtual environment
CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
source "$MINICONDA_DIR/bin/activate" "$INSTALL_ENV_DIR"
cd lollms-webui
echo Pulling latest changes
git pull
echo Reinstalling requirements
pip install --upgrade -r requirements.txt
pause

View File

@ -1,63 +0,0 @@
#!/bin/bash
echo Starting LOLLMS Web UI...
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo " By ParisNeo"
echo " Models list update script"
cd "$(dirname "$0")"
# better isolation for virtual environment
CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
source "$MINICONDA_DIR/bin/activate" "$INSTALL_ENV_DIR"
# Set your repository URL and file path
repository_url="https://github.com/ParisNeo/lollms_bindings_zoo.git"
# Set the destination folder where the file will be downloaded
destination_folder="downloaded_files"
# Create the destination folder if it doesn't exist
if [ ! -d "$destination_folder" ]; then
mkdir "$destination_folder"
fi
# Clone the repository (if not already cloned)
if [ ! -d "$destination_folder/repository" ]; then
git clone "$repository_url" "$destination_folder/repository"
fi
cd "$destination_folder/repository"
echo "Updating models"
cp hugging_face/models.yaml ../../personal_data/bindings_zoo/hugging_face/models.yaml
cp c_transformers/models.yaml ../../personal_data/bindings_zoo/c_transformers/models.yaml
cp llama_cpp_official/models.yaml ../../personal_data/bindings_zoo/llama_cpp_official/models.yaml
cp gpt_4all/models.yaml ../../personal_data/bindings_zoo/gpt_4all/models.yaml
cp py_llama_cpp/models.yaml ../../personal_data/bindings_zoo/py_llama_cpp/models.yaml
cp gptq/models.yaml ../../personal_data/bindings_zoo/gptq/models.yaml
cp exllama/models.yaml ../../personal_data/bindings_zoo/exllama/models.yaml
echo "Updating models"

View File

@ -4,8 +4,8 @@ echo "This will uninstall the environment. Are you sure? [Y/N]"
read choice
if [[ "$choice" =~ [yY] ]]; then
# Download Python installer
printf "Removing virtual environment..."
rm -rf env
printf "Removing lollms conda environment"
echo "OK"
read -p "Press [Enter] to continue..."
else

View File

@ -61,6 +61,7 @@ def execute_latex(code, discussion_id, message_id):
except subprocess.CalledProcessError as ex:
lollmsElfServer.error(f"Error occurred while compiling LaTeX: {ex}")
execution_time = time.time() - start_time
error_json = {"output": "<div class='text-red-500'>"+str(ex)+"\n"+get_trace_exception(ex)+"</div>", "execution_time": execution_time}
return error_json

View File

@ -766,7 +766,24 @@
>
</div>
</td>
</tr>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="positive_boost" class="text-sm font-bold" style="margin-right: 1rem;">Positive Boost:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="text"
id="positive_boost"
required
v-model="configFile.positive_boost"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
</table>
</Card>

@ -1 +1 @@
Subproject commit 0591f525d6fc86e93b34f812b06b8bf7dcbf3649
Subproject commit 1bfd21219fea347efc3c90331e60c9f24efdc8c9