changed server config
This commit is contained in:
+5
-1
@@ -41,7 +41,11 @@ model.load_state_dict(torch.load(full_path, map_location=torch.device(device)))
|
|||||||
model.to(device)
|
model.to(device)
|
||||||
model.eval()
|
model.eval()
|
||||||
|
|
||||||
app = FastAPI(root_path="/cnn-api")
|
app = FastAPI(
|
||||||
|
root_path="/cnn-api",
|
||||||
|
openapi_url="/cnn-api/openapi.json",
|
||||||
|
docs_url="/cnn-api/docs"
|
||||||
|
)
|
||||||
|
|
||||||
@app.post("/predict")
|
@app.post("/predict")
|
||||||
async def predict(file: UploadFile = File(...)):
|
async def predict(file: UploadFile = File(...)):
|
||||||
|
|||||||
Reference in New Issue
Block a user