Skip to content

Commit

Permalink
Fix for model size selection on apple silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus committed Nov 3, 2024
1 parent c648ad7 commit a015876
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions buzz/widgets/transcriber/transcription_options_group_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def __init__(
self.form_layout.addRow("", self.whisper_model_size_layout)

Check warning on line 107 in buzz/widgets/transcriber/transcription_options_group_box.py

View check run for this annotation

Codecov / codecov/patch

buzz/widgets/transcriber/transcription_options_group_box.py#L107

Added line #L107 was not covered by tests
else:
self.load_note_tooltip_icon = None
self.whisper_model_size_layout = None
self.form_layout.addRow("", self.whisper_model_size_combo_box)

self.form_layout.addRow("", self.hugging_face_search_line_edit)
Expand Down Expand Up @@ -197,6 +198,14 @@ def reset_visible_rows(self):
or (model_type == ModelType.WHISPER_CPP)
or (model_type == ModelType.FASTER_WHISPER),
)
if self.whisper_model_size_layout is not None:
self.whisper_model_size_layout.setRowVisible(

Check warning on line 202 in buzz/widgets/transcriber/transcription_options_group_box.py

View check run for this annotation

Codecov / codecov/patch

buzz/widgets/transcriber/transcription_options_group_box.py#L202

Added line #L202 was not covered by tests
self.whisper_model_size_layout,
(model_type == ModelType.WHISPER)
or (model_type == ModelType.WHISPER_CPP)
or (model_type == ModelType.FASTER_WHISPER),
)

self.form_layout.setRowVisible(
self.openai_access_token_edit, model_type == ModelType.OPEN_AI_WHISPER_API
)
Expand Down

0 comments on commit a015876

Please sign in to comment.