Skip to content

Commit

Permalink
[SeamlessM4TTokenizer] Safe import (huggingface#28026)
Browse files Browse the repository at this point in the history
safe import
  • Loading branch information
ArthurZucker authored and staghado committed Jan 15, 2024
1 parent abc9d03 commit 9d21601
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
TextInput,
)
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import PaddingStrategy, logging
from .tokenization_seamless_m4t import (
SeamlessM4TTokenizer,
)
from ...utils import PaddingStrategy, is_sentencepiece_available, logging


if is_sentencepiece_available():
from .tokenization_seamless_m4t import SeamlessM4TTokenizer
else:
SeamlessM4TTokenizer = None

logger = logging.get_logger(__name__)

Expand Down

0 comments on commit 9d21601

Please sign in to comment.