Skip to content

Commit

Permalink
enable predict buttons after model loading
Browse files Browse the repository at this point in the history
  • Loading branch information
guiwitz committed Feb 28, 2024
1 parent 418208d commit 6bd4f5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/napari_convpaint/conv_paint.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,13 @@ def load_classifier(self, event=None, save_file=None):
save_file, _ = dialog.getOpenFileName(self, "Choose model", None, "JOBLIB (*.joblib)")
save_file = Path(save_file)
self.random_forest, self.param = load_trained_classifier(save_file)
self.reset_predict_buttons_after_training()
self.current_model_path.setText(save_file.name)

self.update_gui_from_params()
self.model = Hookmodel(param=self.param, use_cuda=self.check_use_cuda.isChecked())

self.reset_predict_buttons_after_training()


def update_gui_from_params(self):
"""Update GUI from parameters and then update NN model with that info."""
Expand Down

0 comments on commit 6bd4f5e

Please sign in to comment.