mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 14:45:46 +01:00
Fix for default HF model (#812)
This commit is contained in:
parent
2d5684c6f4
commit
004613906c
5 changed files with 17 additions and 6 deletions
|
|
@ -54,6 +54,14 @@ On versions prior to Ubuntu 24.04 install `sudo apt-get install --no-install-rec
|
|||
7. Build Buzz `poetry build`
|
||||
8. Run Buzz `python -m buzz`
|
||||
|
||||
#### Error for Faster Whisper on GPU `Could not load library libcudnn_ops_infer.so.8`
|
||||
|
||||
You need to add path to the library to the `LD_LIBRARY_PATH` environment variable.
|
||||
Check exact path to your poetry virtual environment, it may be different for you.
|
||||
|
||||
```
|
||||
export LD_LIBRARY_PATH=/home/PutYourUserNameHere/.cache/pypoetry/virtualenvs/buzz-captions-JjGFxAW6-py3.12/lib/python3.12/site-packages/nvidia/cudnn/lib/:$LD_LIBRARY_PATH
|
||||
```
|
||||
### Windows
|
||||
|
||||
Assumes you have [Git](https://git-scm.com/downloads) and [python](https://www.python.org/downloads) installed and added to PATH.
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ HUGGING_FACE_MODEL_ALLOW_PATTERNS = [
|
|||
class TranscriptionModel:
|
||||
model_type: ModelType = ModelType.WHISPER
|
||||
whisper_model_size: Optional[WhisperModelSize] = WhisperModelSize.TINY
|
||||
hugging_face_model_id: Optional[str] = None
|
||||
hugging_face_model_id: Optional[str] = "openai/whisper-tiny"
|
||||
|
||||
def __str__(self):
|
||||
match self.model_type:
|
||||
|
|
|
|||
|
|
@ -29,12 +29,10 @@ class HuggingFaceSearchLineEdit(LineEdit):
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
default_value: str,
|
||||
network_access_manager: Optional[QNetworkAccessManager] = None,
|
||||
parent: Optional[QWidget] = None,
|
||||
):
|
||||
self.settings = QSettings(APP_NAME)
|
||||
default_value = self.settings.value("hugging_face_model_id", "openai/whisper-tiny")
|
||||
|
||||
super().__init__(default_value, parent)
|
||||
|
||||
self.setMinimumWidth(150)
|
||||
|
|
@ -76,7 +74,6 @@ class HuggingFaceSearchLineEdit(LineEdit):
|
|||
|
||||
item = self.popup.currentItem()
|
||||
self.setText(item.text())
|
||||
self.settings.setValue("hugging_face_model_id", item.text())
|
||||
QMetaObject.invokeMethod(self, "returnPressed")
|
||||
self.model_selected.emit(item.data(Qt.ItemDataRole.UserRole))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
from typing import Optional, List
|
||||
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
|
|
@ -65,7 +66,9 @@ class TranscriptionOptionsGroupBox(QGroupBox):
|
|||
self.on_openai_access_token_edit_changed
|
||||
)
|
||||
|
||||
self.hugging_face_search_line_edit = HuggingFaceSearchLineEdit()
|
||||
self.hugging_face_search_line_edit = HuggingFaceSearchLineEdit(
|
||||
default_value=default_transcription_options.model.hugging_face_model_id
|
||||
)
|
||||
self.hugging_face_search_line_edit.model_selected.connect(
|
||||
self.on_hugging_face_model_changed
|
||||
)
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ class TestTemperatureValidator:
|
|||
class TestHuggingFaceSearchLineEdit:
|
||||
def test_should_update_selected_model_on_type(self, qtbot: QtBot):
|
||||
widget = HuggingFaceSearchLineEdit(
|
||||
default_value="",
|
||||
network_access_manager=self.network_access_manager()
|
||||
)
|
||||
qtbot.add_widget(widget)
|
||||
|
|
@ -173,6 +174,7 @@ class TestHuggingFaceSearchLineEdit:
|
|||
|
||||
def test_should_show_list_of_models(self, qtbot: QtBot):
|
||||
widget = HuggingFaceSearchLineEdit(
|
||||
default_value="",
|
||||
network_access_manager=self.network_access_manager()
|
||||
)
|
||||
qtbot.add_widget(widget)
|
||||
|
|
@ -184,6 +186,7 @@ class TestHuggingFaceSearchLineEdit:
|
|||
|
||||
def test_should_select_model_from_list(self, qtbot: QtBot):
|
||||
widget = HuggingFaceSearchLineEdit(
|
||||
default_value="",
|
||||
network_access_manager=self.network_access_manager()
|
||||
)
|
||||
qtbot.add_widget(widget)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue