[serving] Update dependencies
This commit is contained in:
2
setup.py
2
setup.py
@@ -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"]
|
||||||
|
|||||||
@@ -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:
|
|||||||
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):
|
||||||
|
|||||||
Reference in New Issue
Block a user