From cdc90c93e19d1d7d4d55ec8ed08df3040b5bbb91 Mon Sep 17 00:00:00 2001 From: BBC-Esq Date: Sat, 20 Jan 2024 14:21:49 -0500 Subject: [PATCH] Delete src/gui_threads.py --- src/gui_threads.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/gui_threads.py diff --git a/src/gui_threads.py b/src/gui_threads.py deleted file mode 100644 index 090e8ea4..00000000 --- a/src/gui_threads.py +++ /dev/null @@ -1,27 +0,0 @@ -from PySide6.QtCore import QThread, Signal -import server_connector -import create_database - -class CreateDatabaseThread(QThread): - def run(self): - create_database.main() - -class SubmitButtonThread(QThread): - responseSignal = Signal(str) - errorSignal = Signal() - - def __init__(self, user_question, parent=None, callback=None): - super(SubmitButtonThread, self).__init__(parent) - self.user_question = user_question - self.callback = callback - - def run(self): - try: - response = server_connector.ask_local_chatgpt(self.user_question) - for response_chunk in response: - self.responseSignal.emit(response_chunk) - if self.callback: - self.callback() - except Exception as err: - self.errorSignal.emit() - print(err) \ No newline at end of file