From 6c07bf0b1d84e5cb836b9b04f1ad802ba02f697d Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sun, 20 Oct 2024 22:20:24 +0200 Subject: [PATCH] fix stuff --- lollms/functions/take_screen_shot.py | 2 +- lollms/services/tti/sd/lollms_sd.py | 4 ++-- lollms/utilities.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lollms/functions/take_screen_shot.py b/lollms/functions/take_screen_shot.py index f31d909..88ca6f8 100644 --- a/lollms/functions/take_screen_shot.py +++ b/lollms/functions/take_screen_shot.py @@ -1,7 +1,7 @@ from lollms.utilities import find_first_available_file_index, discussion_path_to_url from lollms.client_session import Client import pipmaster as pm - +from functools import partial def take_screenshot(client: Client, use_ui: bool = False, use_a_single_photo_at_a_time= True): diff --git a/lollms/services/tti/sd/lollms_sd.py b/lollms/services/tti/sd/lollms_sd.py index e361a3f..cad6f29 100644 --- a/lollms/services/tti/sd/lollms_sd.py +++ b/lollms/services/tti/sd/lollms_sd.py @@ -29,7 +29,7 @@ from typing import List, Dict, Any from ascii_colors import ASCIIColors, trace_exception from lollms.paths import LollmsPaths from lollms.tti import LollmsTTI -from lollms.utilities import git_pull, show_yes_no_dialog, run_script_in_env, create_conda_env +from lollms.utilities import git_pull, show_yes_no_dialog, run_script_in_env, create_env import subprocess import shutil from tqdm import tqdm @@ -64,7 +64,7 @@ def install_sd(lollms_app:LollmsApplication): shared_folder = root_dir/"shared" sd_folder = shared_folder / "auto_sd" ASCIIColors.cyan("Installing autosd conda environment with python 3.10") - create_conda_env("autosd","3.10") + create_env("autosd","3.10") ASCIIColors.cyan("Done") if os.path.exists(str(sd_folder)): print("Repository already exists. Pulling latest changes...") diff --git a/lollms/utilities.py b/lollms/utilities.py index 0ccc7dd..287ef9f 100644 --- a/lollms/utilities.py +++ b/lollms/utilities.py @@ -40,6 +40,10 @@ import subprocess from functools import partial + +def create_env(env_name, python_version): + pass + def run_pip_in_env(env_name, pip_args, cwd=None): import platform # Set the current working directory if provided, otherwise use the current directory