From d619f55ff25fae8f24b4a3a8bae4cb780b48b080 Mon Sep 17 00:00:00 2001 From: jeffser Date: Sun, 26 May 2024 00:01:14 -0600 Subject: [PATCH] Quick fixes --- data/com.jeffser.Alpaca.metainfo.xml.in | 7 +++++-- src/window.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/data/com.jeffser.Alpaca.metainfo.xml.in b/data/com.jeffser.Alpaca.metainfo.xml.in index 1c2cb40..ed2f278 100644 --- a/data/com.jeffser.Alpaca.metainfo.xml.in +++ b/data/com.jeffser.Alpaca.metainfo.xml.in @@ -5,15 +5,16 @@ GPL-3.0-or-later com.jeffser.Alpaca.desktop Alpaca - Chat with local AI models + Chat with local AI models powered by Ollama

An Ollama client

Features

Disclaimer

@@ -36,6 +37,8 @@ keyboard + pointing + touch #8cdef5 diff --git a/src/window.py b/src/window.py index bf921b6..80b717f 100644 --- a/src/window.py +++ b/src/window.py @@ -126,9 +126,11 @@ class AlpacaWindow(Adw.ApplicationWindow): selected = self.model_drop_down.get_selected_item().get_string().split(":")[0] if selected in ['llava', 'bakllava', 'moondream', 'llava-llama3']: self.image_button.set_sensitive(True) + self.image_button.set_tooltip_text(_("Upload image")) return True else: self.image_button.set_sensitive(False) + self.image_button.set_tooltip_text(_("Only available on selected models")) self.image_button.set_css_classes([]) self.image_button.get_child().set_icon_name("image-x-generic-symbolic") self.attached_image = {"path": None, "base64": None} @@ -763,7 +765,8 @@ class AlpacaWindow(Adw.ApplicationWindow): if self.run_remote: dialogs.reconnect_remote(self) else: - local_instance.restart() + local_instance.stop() + local_instance.start(self.data_dir) self.show_toast("error", 7, self.main_overlay) def connection_switched(self): @@ -773,7 +776,7 @@ class AlpacaWindow(Adw.ApplicationWindow): if self.run_remote: connection_handler.url = self.remote_url if self.verify_connection() == False: self.connection_error() - else: local_instance.stop(self) + else: local_instance.stop() else: connection_handler.url = f"http://127.0.0.1:{local_instance.port}" local_instance.start(self.data_dir)