mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Let a downloaded program be downloaded again
The button disappeared the moment anything landed, and nothing else on the window asks for that download. So a machine that got the processor build before its graphics driver was installed can never be given the Vulkan one, and nobody can pick up a newer whisper.cpp either: both of those are the same missing control. It reads "Download again" once a copy is here, and stays hidden while a system one is on the PATH, because that is the copy that would run.
This commit is contained in:
+10
-2
@@ -349,10 +349,18 @@ class LocalModelBox(QGroupBox):
|
||||
path = ggml.program_path(self.program)
|
||||
if not path:
|
||||
self.program_label.setText(t("Not installed."))
|
||||
self.install_button.setText(t("Download"))
|
||||
self.install_button.setVisible(True)
|
||||
return
|
||||
self.install_button.setVisible(not ggml.installed_program(self.program)
|
||||
and not ggml.system_program(self.program))
|
||||
# A copy that is here is not a copy that is right. whisper.cpp releases
|
||||
# every few weeks, and a graphics card installed after Dikte was
|
||||
# changes which build this machine should be running; the button was
|
||||
# hidden the moment anything landed, and nothing else on this window
|
||||
# asks for the download again.
|
||||
self.install_button.setText(t("Download again")
|
||||
if ggml.installed_program(self.program)
|
||||
else t("Download"))
|
||||
self.install_button.setVisible(not ggml.system_program(self.program))
|
||||
if ggml.system_program(self.program):
|
||||
# Worth saying which one is running: a distribution package is built
|
||||
# for this machine and may reach the graphics card, while the
|
||||
|
||||
Reference in New Issue
Block a user