From 5a28a16119b97b2d9cec60c247818d19498a2a12 Mon Sep 17 00:00:00 2001 From: jeffser Date: Mon, 2 Sep 2024 12:52:15 -0600 Subject: [PATCH] Fixed pull model --- src/custom_widgets/model_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/custom_widgets/model_widget.py b/src/custom_widgets/model_widget.py index 2f1530f..04b7ebf 100644 --- a/src/custom_widgets/model_widget.py +++ b/src/custom_widgets/model_widget.py @@ -508,9 +508,9 @@ class model_manager_container(Gtk.Box): GLib.idle_add(self.pulling_list.set_visible, True) if modelfile: - response = self.ollama_instance.request("POST", "api/create", json.dumps({"name": model_name, "modelfile": modelfile}), lambda data: model.update(data)) + response = window.ollama_instance.request("POST", "api/create", json.dumps({"name": model_name, "modelfile": modelfile}), lambda data: model.update(data)) else: - response = self.ollama_instance.request("POST", "api/pull", json.dumps({"name": model_name}), lambda data: model.update(data)) + response = window.ollama_instance.request("POST", "api/pull", json.dumps({"name": model_name}), lambda data: model.update(data)) if response.status_code == 200 and not model.error: GLib.idle_add(window.show_notification, _("Task Complete"), _("Model '{}' pulled successfully.").format(model_name), Gio.ThemedIcon.new("emblem-ok-symbolic"))