From 814520fed1f015ba7df0193f035849d4731981c4 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:27:06 -0700 Subject: [PATCH] Extension install improvements --- modules/github.py | 3 +-- modules/ui_session.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/github.py b/modules/github.py index d68ca847..093f4b9d 100644 --- a/modules/github.py +++ b/modules/github.py @@ -34,8 +34,7 @@ def clone_or_pull_repository(github_url): yield f"Cloning {github_url}..." clone_output = subprocess.check_output(["git", "clone", github_url, repo_path], stderr=subprocess.STDOUT) new_extensions.add(repo_name) - logger.info(f"The extension {repo_name} has been downloaded. Please close the the web UI and launch it again to be able to load it.") - yield "Done." + yield(f"The extension `{repo_name}` has been downloaded.\n\nPlease close the the web UI completely and launch it again to be able to load it.") return clone_output.decode() except subprocess.CalledProcessError as e: return str(e) diff --git a/modules/ui_session.py b/modules/ui_session.py index 53d9ec3f..0f96a245 100644 --- a/modules/ui_session.py +++ b/modules/ui_session.py @@ -25,9 +25,7 @@ def create_ui(): extension_name = gr.Textbox(lines=1, label='Install or update an extension', info='Enter the GitHub URL below and press Enter. For a list of extensions, see: https://github.com/oobabooga/text-generation-webui-extensions ⚠️ WARNING ⚠️ : extensions can execute arbitrary code. Make sure to inspect their source code before activating them.') extension_status = gr.Markdown() - extension_name.submit( - clone_or_pull_repository, extension_name, extension_status, show_progress=False).then( - lambda: gr.update(choices=utils.get_available_extensions(), value=shared.args.extensions), None, gradio('extensions_menu')) + extension_name.submit(clone_or_pull_repository, extension_name, extension_status, show_progress=False) # Reset interface event shared.gradio['reset_interface'].click(