Skip to content

Commit

Permalink
final checks
Browse files Browse the repository at this point in the history
  • Loading branch information
UdAyAn123 committed Feb 3, 2024
1 parent 3690a3a commit 14c8a9f
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# main.py
from fastapi import FastAPI
import uvicorn
import argparse

app = FastAPI()
def create_app():
app = FastAPI()

@app.get("/healthcheck")
def healthcheck():
return {"status": "ok"}
@app.get("/healthcheck")
def healthcheck():
return {"status": "ok"}

# You can add more endpoints here as needed
return app

if __name__ == "__main__":

parser = argparse.ArgumentParser(description="FastAPI Machine Learning API")
parser.add_argument("--port", type=int, default=8000, help="Port number to bind the FastAPI application")
args = parser.parse_args()

uvicorn.run("main:create_app", host="127.0.0.1", port=args.port, reload=True)

0 comments on commit 14c8a9f

Please sign in to comment.