-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91b1a8d
commit 8671ba2
Showing
6 changed files
with
48 additions
and
9 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
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
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from .import_utils import (DummyObject, is_transformers_available, | ||
requires_backends) | ||
from .import_utils import (DummyObject, is_accelerate_available, | ||
is_transformers_available, requires_backends) |
19 changes: 19 additions & 0 deletions
19
src/speechbox/utils/dummy_transformers_and_accelerate_objects.py
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,19 @@ | ||
# This file is autogenerated by the command `make fix-copies`, do not edit. | ||
# flake8: noqa | ||
|
||
from ..utils import DummyObject, requires_backends | ||
|
||
|
||
class PunctuationRestorer(metaclass=DummyObject): | ||
_backends = ["transformers", "accelerate"] | ||
|
||
def __init__(self, *args, **kwargs): | ||
requires_backends(self, ["transformers", "accelerate"]) | ||
|
||
@classmethod | ||
def from_config(cls, *args, **kwargs): | ||
requires_backends(cls, ["transformers", "accelerate"]) | ||
|
||
@classmethod | ||
def from_pretrained(cls, *args, **kwargs): | ||
requires_backends(cls, ["transformers", "accelerate"]) |
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