File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,13 +37,9 @@ def __init__(
3737 self ,
3838 model : VetiverModel ,
3939 check_ptype : bool = True ,
40- port : Optional [int ] = 8000 ,
41- host = "127.0.0.1" ,
4240 app_factory = FastAPI ,
4341 ) -> None :
4442 self .model = model
45- self .port = port
46- self .host = host
4743 self .check_ptype = check_ptype
4844 self .app_factory = app_factory
4945 self .app = self ._init_app ()
@@ -152,10 +148,13 @@ async def custom_endpoint(input_data: Request):
152148
153149 return {endpoint_name : new .tolist ()}
154150
155- def run (self ):
151+ def run (self ,
152+ port : int = 8000 ,
153+ host : str = "127.0.0.1" ,
154+ ** kw ):
156155 """Start API"""
157156 _jupyter_nb ()
158- uvicorn .run (self .app , port = self . port , host = self . host )
157+ uvicorn .run (self .app , port = port , host = host , ** kw )
159158
160159 def _custom_openapi (self ):
161160 if self .app .openapi_schema :
You can’t perform that action at this time.
0 commit comments