From 120695ddf761861fb9e6a0e06c3df762aedf5646 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 7 Oct 2023 01:33:18 +0800 Subject: [PATCH] add update link --- koboldcpp.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index a82503bb7..c229ac7df 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -1397,13 +1397,20 @@ def show_new_gui(): import webbrowser as wb wb.open("https://github.com/LostRuins/koboldcpp/wiki") except: - print("Cannot launch help browser.") + print("Cannot launch help in browser.") + def display_updates(): + try: + import webbrowser as wb + wb.open("https://github.com/LostRuins/koboldcpp/releases/latest") + except: + print("Cannot launch updates in browser.") ctk.CTkButton(tabs , text = "Launch", fg_color="#2f8d3c", hover_color="#2faa3c", command = guilaunch, width=80, height = 35 ).grid(row=1,column=1, stick="se", padx= 25, pady=5) + ctk.CTkButton(tabs , text = "Update", fg_color="#9900cc", hover_color="#aa11dd", command = display_updates, width=90, height = 35 ).grid(row=1,column=0, stick="sw", padx= 5, pady=5) ctk.CTkButton(tabs , text = "Save", fg_color="#084a66", hover_color="#085a88", command = save_config, width=60, height = 35 ).grid(row=1,column=1, stick="sw", padx= 5, pady=5) ctk.CTkButton(tabs , text = "Load", fg_color="#084a66", hover_color="#085a88", command = load_config, width=60, height = 35 ).grid(row=1,column=1, stick="sw", padx= 70, pady=5) - ctk.CTkButton(tabs , text = "Help", fg_color="#992222", hover_color="#bb3333", command = display_help, width=90, height = 35 ).grid(row=1,column=0, stick="sw", padx= 5, pady=5) + ctk.CTkButton(tabs , text = "Help", fg_color="#992222", hover_color="#bb3333", command = display_help, width=60, height = 35 ).grid(row=1,column=1, stick="sw", padx= 135, pady=5) # runs main loop until closed or launch clicked root.mainloop()