From 39094fb6a326e8ef4cc13b1629e6ea4710652dd3 Mon Sep 17 00:00:00 2001 From: artitw Date: Mon, 7 Oct 2024 04:39:30 +0000 Subject: [PATCH] Fix Assistant --- setup.py | 2 +- text2text/assistant.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 33e1681..90721e9 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="text2text", - version="1.6.5", + version="1.6.6", author="artitw", author_email="artitw@gmail.com", description="Text2Text: Crosslingual NLP/G toolkit", diff --git a/text2text/assistant.py b/text2text/assistant.py index 8e24ee0..6ae95e5 100644 --- a/text2text/assistant.py +++ b/text2text/assistant.py @@ -67,7 +67,7 @@ def load_model(self): response = requests.get("https://ollama.com/install.sh") install_script = response.text result = run_sh(install_script) - if "Install complete." not in result and "will run in CPU-only mode." not in result: + if result and "Install complete." not in result and "will run in CPU-only mode." not in result: raise Exception(result) self.ollama_serve_proc = subprocess.Popen(["ollama", "serve"])