From ccc5d5b8ac5f5e491efba5f6cbe37f7e90746643 Mon Sep 17 00:00:00 2001 From: BBC-Esq Date: Wed, 7 Aug 2024 14:09:37 -0400 Subject: [PATCH] v6.5.0 --- src/chat_local_model.py | 4 ---- src/document_processor.py | 1 - src/gui_tabs_databases.py | 8 +------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/chat_local_model.py b/src/chat_local_model.py index 57feca4c..28cb0250 100644 --- a/src/chat_local_model.py +++ b/src/chat_local_model.py @@ -10,11 +10,7 @@ import module_chat from database_interactions import QueryVectorDB -from utilities import my_cprint -logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', - filename='local_model_chat.log') class LocalModelSignals(QObject): response_signal = Signal(str) # 7. signal for sending response diff --git a/src/document_processor.py b/src/document_processor.py index e27e12df..e9bd5c9e 100644 --- a/src/document_processor.py +++ b/src/document_processor.py @@ -26,7 +26,6 @@ ) from constants import DOCUMENT_LOADERS -from module_process_images import loader_cogvlm, loader_llava from extract_metadata import extract_document_metadata from utilities import my_cprint import traceback diff --git a/src/gui_tabs_databases.py b/src/gui_tabs_databases.py index dbc97d82..51cbe04b 100644 --- a/src/gui_tabs_databases.py +++ b/src/gui_tabs_databases.py @@ -124,7 +124,7 @@ def __init__(self): def populate_model_combobox(self): self.model_combobox.clear() - self.model_combobox.addItem("Select a model", None) # Add a blank item + self.model_combobox.addItem("Select a model", None) script_dir = Path(__file__).resolve().parent vector_dir = script_dir / "Models" / "vector" @@ -159,10 +159,8 @@ def sync_combobox_with_config(self): print(f"Warning: Model {current_model} from config not found in combo box") self.model_combobox.setCurrentIndex(0) else: - print("No model specified in config, defaulting to 'Select a model'") self.model_combobox.setCurrentIndex(0) else: - print("Config file not found, defaulting to 'Select a model'") self.model_combobox.setCurrentIndex(0) def on_model_selected(self, index): @@ -257,7 +255,6 @@ def on_create_db_clicked(self): QMessageBox.warning(self, "No Model Selected", "Please select a model before creating a database.") return - # disable widgets self.create_db_button.setDisabled(True) self.choose_docs_button.setDisabled(True) self.model_combobox.setDisabled(True) @@ -266,10 +263,8 @@ def on_create_db_clicked(self): database_name = self.database_name_input.text().strip() script_dir = Path(__file__).resolve().parent - # check conditions checks_passed, message = check_preconditions_for_db_creation(script_dir, database_name) - # re-enable widgets if any condition fails if not checks_passed: self.create_db_button.setDisabled(False) self.choose_docs_button.setDisabled(False) @@ -280,7 +275,6 @@ def on_create_db_clicked(self): print(f"Database will be named: '{database_name}'") - # start create database thread self.create_database_thread = CreateDatabaseThread(database_name=database_name, parent=self) self.create_database_thread.creationComplete.connect(self.reenable_create_db_button) self.create_database_thread.start()