Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
37b5946a
Unverified
Commit
37b5946a
authored
Apr 16, 2024
by
Sai-Suraj-27
Committed by
GitHub
Apr 16, 2024
Browse files
fix: Fixed a `raise` statement (#30275)
* Fixed a raise statement. * Minor changes.
parent
c63f1589
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/transformers/models/whisper/convert_openai_to_hf.py
src/transformers/models/whisper/convert_openai_to_hf.py
+5
-3
No files found.
src/transformers/models/whisper/convert_openai_to_hf.py
View file @
37b5946a
...
...
@@ -347,9 +347,11 @@ if __name__ == "__main__":
if
args
.
convert_preprocessor
:
try
:
if
not
_is_package_available
(
"tiktoken"
):
raise
"""`tiktoken` is not installed, use `pip install tiktoken` to convert the tokenizer"""
except
Exception
:
pass
raise
ModuleNotFoundError
(
"""`tiktoken` is not installed, use `pip install tiktoken` to convert the tokenizer"""
)
except
Exception
as
e
:
print
(
e
)
else
:
from
tiktoken.load
import
load_tiktoken_bpe
...
...
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