Update main.py
Browse files
main.py
CHANGED
@@ -29,7 +29,7 @@ api_router = APIRouter()
|
|
29 |
# return {"message": "Hello World!"}
|
30 |
|
31 |
|
32 |
-
@api_router.get("/classify
|
33 |
async def predict_image(image_name, model=model):
|
34 |
img = load_image(image_name)
|
35 |
prediction, pred_idx, probs = model.predict(img)
|
|
|
29 |
# return {"message": "Hello World!"}
|
30 |
|
31 |
|
32 |
+
@api_router.get("/classify", status_code=200, response_model=ClassificationResult)
|
33 |
async def predict_image(image_name, model=model):
|
34 |
img = load_image(image_name)
|
35 |
prediction, pred_idx, probs = model.predict(img)
|