Skip to content

Commit

Permalink
remove demo lock
Browse files Browse the repository at this point in the history
  • Loading branch information
w4ffl35 committed Oct 11, 2024
1 parent 503dc4d commit 02d1942
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ def __init__(self, *args, **kwargs):
def size_lock_toggled(self, val):
self.update_application_settings("active_grid_size_lock", val)

def apply_demo_lock(self):
elements = [
self.ui.width_slider_widget,
self.ui.height_slider_widget
]

for element in elements:
element.ui.slider.setEnabled(False)
element.ui.slider_spinbox.setEnabled(False)

def update_size(self, message: dict):
width = self.application_settings.working_width
height = self.application_settings.working_height
Expand Down
5 changes: 0 additions & 5 deletions src/airunner/widgets/base_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ def showEvent(self, event):
using __init__.
"""
self.initialize()
if os.getenv("DEMO_MODE") == "True":
self.apply_demo_lock()

def set_icons(self):
theme = "dark" if self.is_dark else "light"
Expand Down Expand Up @@ -180,6 +178,3 @@ def set_is_checked(self, element, val):
return True
except AttributeError:
return False

def apply_demo_lock(self):
pass
23 changes: 0 additions & 23 deletions src/airunner/widgets/llm/bot_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,6 @@ def showEvent(self, event):
self.load_saved_chatbots()
super().showEvent(event)

def apply_demo_lock(self):
elements = [
self.ui.username,
self.ui.botname,
self.ui.bot_personality,
self.ui.bot_mood,
self.ui.names_groupbox,
self.ui.personality_groupbox,
self.ui.mood_groupbox,
self.ui.system_instructions,
self.ui.system_instructions_groupbox,
self.ui.guardrails_prompt,
self.ui.guardrails_groupbox,
self.ui.target_files,
self.ui.create_new_button,
self.ui.delete_button,
self.ui.saved_chatbots,
self.ui.comboBox,
]

for element in elements:
element.setEnabled(False)

def load_form_elements(self):
elements = [
"username",
Expand Down
25 changes: 0 additions & 25 deletions src/airunner/widgets/llm/llm_settings_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,6 @@ def showEvent(self, event):
super().showEvent(event)
self.emit_signal(SignalCode.WINDOW_LOADED_SIGNAL)

def apply_demo_lock(self):
elements = [
self.ui.prompt_template,
self.ui.model,
self.ui.model_version,
self.ui.random_seed,
self.ui.do_sample,
self.ui.early_stopping,
self.ui.override_parameters,
self.ui.use_cache,
self.ui.top_p,
self.ui.max_new_tokens,
self.ui.repetition_penalty,
self.ui.min_length,
self.ui.length_penalty,
self.ui.num_beams,
self.ui.ngram_size,
self.ui.temperature,
self.ui.sequences,
self.ui.top_k
]

for element in elements:
element.setEnabled(False)

def early_stopping_toggled(self, val):
self.update_chatbot("early_stopping", val)

Expand Down

0 comments on commit 02d1942

Please sign in to comment.