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
5004d5af
Commit
5004d5af
authored
Jan 27, 2020
by
Julien Chaumond
Browse files
[serving] Update dependencies
parent
9ca21c83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
setup.py
setup.py
+1
-1
src/transformers/commands/serving.py
src/transformers/commands/serving.py
+1
-1
No files found.
setup.py
View file @
5004d5af
...
@@ -63,7 +63,7 @@ extras["sklearn"] = ["scikit-learn"]
...
@@ -63,7 +63,7 @@ extras["sklearn"] = ["scikit-learn"]
extras
[
"tf"
]
=
[
"tensorflow"
]
extras
[
"tf"
]
=
[
"tensorflow"
]
extras
[
"torch"
]
=
[
"torch"
]
extras
[
"torch"
]
=
[
"torch"
]
extras
[
"serving"
]
=
[
"pydantic"
,
"uvicorn"
,
"fastapi"
]
extras
[
"serving"
]
=
[
"pydantic"
,
"uvicorn"
,
"fastapi"
,
"starlette"
]
extras
[
"all"
]
=
extras
[
"serving"
]
+
[
"tensorflow"
,
"torch"
]
extras
[
"all"
]
=
extras
[
"serving"
]
+
[
"tensorflow"
,
"torch"
]
extras
[
"testing"
]
=
[
"pytest"
,
"pytest-xdist"
]
extras
[
"testing"
]
=
[
"pytest"
,
"pytest-xdist"
]
...
...
src/transformers/commands/serving.py
View file @
5004d5af
...
@@ -2,7 +2,6 @@ import logging
...
@@ -2,7 +2,6 @@ import logging
from
argparse
import
ArgumentParser
,
Namespace
from
argparse
import
ArgumentParser
,
Namespace
from
typing
import
Any
,
List
,
Optional
from
typing
import
Any
,
List
,
Optional
from
starlette.responses
import
JSONResponse
from
transformers
import
Pipeline
from
transformers
import
Pipeline
from
transformers.commands
import
BaseTransformersCLICommand
from
transformers.commands
import
BaseTransformersCLICommand
from
transformers.pipelines
import
SUPPORTED_TASKS
,
pipeline
from
transformers.pipelines
import
SUPPORTED_TASKS
,
pipeline
...
@@ -13,6 +12,7 @@ try:
...
@@ -13,6 +12,7 @@ try:
from
fastapi
import
FastAPI
,
HTTPException
,
Body
from
fastapi
import
FastAPI
,
HTTPException
,
Body
from
fastapi.routing
import
APIRoute
from
fastapi.routing
import
APIRoute
from
pydantic
import
BaseModel
from
pydantic
import
BaseModel
from
starlette.responses
import
JSONResponse
_serve_dependancies_installed
=
True
_serve_dependancies_installed
=
True
except
(
ImportError
,
AttributeError
):
except
(
ImportError
,
AttributeError
):
...
...
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