Removed unnecesary code

This commit is contained in:
jeffser 2024-09-02 12:43:41 -06:00
parent 8869296aed
commit d33e9c53d8
2 changed files with 3 additions and 10 deletions

View File

@ -155,14 +155,14 @@ class pulling_model(Gtk.ListBoxRow):
description_box.append(subtitle_box)
description_box.append(self.progress_bar)
delete_button = Gtk.Button(
stop_button = Gtk.Button(
icon_name = "media-playback-stop-symbolic",
vexpand = False,
valign = 3,
css_classes = ["destructive-action", "circular"],
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(
hexpand=True,
@ -176,7 +176,7 @@ class pulling_model(Gtk.ListBoxRow):
)
container_box.append(description_box)
container_box.append(delete_button)
container_box.append(stop_button)
super().__init__(
child=container_box,

View File

@ -51,8 +51,6 @@ class AlpacaWindow(Adw.ApplicationWindow):
#Variables
model_tweaks = {"temperature": 0.7, "seed": 0, "keep_alive": 5}
pulling_models = {}
attachments = {}
header_bar = Gtk.Template.Child()
@ -620,11 +618,6 @@ Generate a title following these rules:
def generate_uuid(self) -> str:
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):
logger.error("Connection error")
if self.ollama_instance.remote: