Removed unnecesary code
This commit is contained in:
parent
8869296aed
commit
d33e9c53d8
@ -155,14 +155,14 @@ class pulling_model(Gtk.ListBoxRow):
|
|||||||
description_box.append(subtitle_box)
|
description_box.append(subtitle_box)
|
||||||
description_box.append(self.progress_bar)
|
description_box.append(self.progress_bar)
|
||||||
|
|
||||||
delete_button = Gtk.Button(
|
stop_button = Gtk.Button(
|
||||||
icon_name = "media-playback-stop-symbolic",
|
icon_name = "media-playback-stop-symbolic",
|
||||||
vexpand = False,
|
vexpand = False,
|
||||||
valign = 3,
|
valign = 3,
|
||||||
css_classes = ["destructive-action", "circular"],
|
css_classes = ["destructive-action", "circular"],
|
||||||
tooltip_text = _("Stop Pulling '{}'").format(window.convert_model_name(model_name, 0))
|
tooltip_text = _("Stop Pulling '{}'").format(window.convert_model_name(model_name, 0))
|
||||||
)
|
)
|
||||||
delete_button.connect('clicked', lambda *_: dialogs.stop_pull_model(window, self))
|
stop_button.connect('clicked', lambda *_: dialogs.stop_pull_model(window, self))
|
||||||
|
|
||||||
container_box = Gtk.Box(
|
container_box = Gtk.Box(
|
||||||
hexpand=True,
|
hexpand=True,
|
||||||
@ -176,7 +176,7 @@ class pulling_model(Gtk.ListBoxRow):
|
|||||||
)
|
)
|
||||||
|
|
||||||
container_box.append(description_box)
|
container_box.append(description_box)
|
||||||
container_box.append(delete_button)
|
container_box.append(stop_button)
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
child=container_box,
|
child=container_box,
|
||||||
|
@ -51,8 +51,6 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
|||||||
|
|
||||||
#Variables
|
#Variables
|
||||||
|
|
||||||
model_tweaks = {"temperature": 0.7, "seed": 0, "keep_alive": 5}
|
|
||||||
pulling_models = {}
|
|
||||||
attachments = {}
|
attachments = {}
|
||||||
header_bar = Gtk.Template.Child()
|
header_bar = Gtk.Template.Child()
|
||||||
|
|
||||||
@ -620,11 +618,6 @@ Generate a title following these rules:
|
|||||||
def generate_uuid(self) -> str:
|
def generate_uuid(self) -> str:
|
||||||
return f"{datetime.today().strftime('%Y%m%d%H%M%S%f')}{uuid.uuid4().hex}"
|
return f"{datetime.today().strftime('%Y%m%d%H%M%S%f')}{uuid.uuid4().hex}"
|
||||||
|
|
||||||
def stop_pull_model(self, model_name):
|
|
||||||
logger.debug("Stopping model pull")
|
|
||||||
self.pulling_models[model_name]['overlay'].get_parent().get_parent().remove(self.pulling_models[model_name]['overlay'].get_parent())
|
|
||||||
del self.pulling_models[model_name]
|
|
||||||
|
|
||||||
def connection_error(self):
|
def connection_error(self):
|
||||||
logger.error("Connection error")
|
logger.error("Connection error")
|
||||||
if self.ollama_instance.remote:
|
if self.ollama_instance.remote:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user