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
d365f507
Unverified
Commit
d365f507
authored
Apr 27, 2022
by
nikkie
Committed by
GitHub
Apr 26, 2022
Browse files
Fix RuntimeError message format (#16906)
parent
10dfa126
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/pipelines/__init__.py
src/transformers/pipelines/__init__.py
+2
-2
No files found.
src/transformers/pipelines/__init__.py
View file @
d365f507
...
@@ -493,8 +493,8 @@ def pipeline(
...
@@ -493,8 +493,8 @@ def pipeline(
if
task
is
None
and
model
is
None
:
if
task
is
None
and
model
is
None
:
raise
RuntimeError
(
raise
RuntimeError
(
"Impossible to instantiate a pipeline without either a task or a model"
"Impossible to instantiate a pipeline without either a task or a model
"
"being specified."
"being specified.
"
"Please provide a task class or a model"
"Please provide a task class or a model"
)
)
...
...
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