Skip to content

Commit

Permalink
v6.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BBC-Esq authored Aug 7, 2024
1 parent e99c7f5 commit ccc5d5b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
4 changes: 0 additions & 4 deletions src/chat_local_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/document_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions src/gui_tabs_databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit ccc5d5b

Please sign in to comment.