Skip to content

Commit

Permalink
Refactor UVICorn run command in main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sahi-mfg committed Jan 2, 2024
1 parent afa60c4 commit fe57e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import uvicorn
from fastapi import FastAPI, File, HTTPException, UploadFile
from .model import load_model, predict, prepare_image
from PIL import Image
from pydantic import BaseModel

from .model import load_model, predict, prepare_image

app = FastAPI(title="Age Detection", description="API to predict age from images", version="0.1")

Expand Down Expand Up @@ -47,4 +47,4 @@ async def prediction(file: UploadFile = File(...)):


if __name__ == "__main__":
uvicorn.run("main:app", port=5001)
uvicorn.run("app.main:app", port=5001)

0 comments on commit fe57e50

Please sign in to comment.