-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes huggingface token in preferences
- Loading branch information
Showing
3 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from PyQt6.QtWidgets import QLineEdit | ||
|
||
from airunner.widgets.api_token.templates.api_token_ui import Ui_api_token | ||
from airunner.widgets.base_widget import BaseWidget | ||
|
||
|
||
class APITokenWidget(BaseWidget): | ||
widget_class_ = Ui_api_token | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.ui.hf_api_key.blockSignals(True) | ||
self.ui.hf_api_key.setEchoMode(QLineEdit.EchoMode.Password) | ||
self.ui.hf_api_key.setText(self.settings_manager.hf_api_key) | ||
self.ui.hf_api_key.blockSignals(False) | ||
|
||
def action_text_edited_api_key(self, value): | ||
self.settings_manager.set_value("hf_api_key", value) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters