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
25ceb818
Unverified
Commit
25ceb818
authored
Oct 27, 2021
by
Anton Lozhkov
Committed by
GitHub
Oct 27, 2021
Browse files
[Pipelines] Fix ASR model types check (#14178)
parent
6200fd7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/pipelines/automatic_speech_recognition.py
src/transformers/pipelines/automatic_speech_recognition.py
+1
-1
No files found.
src/transformers/pipelines/automatic_speech_recognition.py
View file @
25ceb818
...
@@ -106,7 +106,7 @@ class AutomaticSpeechRecognitionPipeline(Pipeline):
...
@@ -106,7 +106,7 @@ class AutomaticSpeechRecognitionPipeline(Pipeline):
if
self
.
framework
==
"tf"
:
if
self
.
framework
==
"tf"
:
raise
ValueError
(
"The AutomaticSpeechRecognitionPipeline is only available in PyTorch."
)
raise
ValueError
(
"The AutomaticSpeechRecognitionPipeline is only available in PyTorch."
)
self
.
check_model_type
(
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
.
items
()
+
MODEL_FOR_CTC_MAPPING
.
items
())
self
.
check_model_type
(
dict
(
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
.
items
()
+
MODEL_FOR_CTC_MAPPING
.
items
())
)
def
__call__
(
def
__call__
(
self
,
self
,
...
...
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