Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
2788f8d8
Unverified
Commit
2788f8d8
authored
Dec 14, 2023
by
Arthur
Committed by
GitHub
Dec 14, 2023
Browse files
[`SeamlessM4TTokenizer`] Safe import (#28026)
safe import
parent
131a528b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py
...ers/models/seamless_m4t/tokenization_seamless_m4t_fast.py
+6
-4
No files found.
src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py
View file @
2788f8d8
...
...
@@ -25,11 +25,13 @@ from ...tokenization_utils import (
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__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment