NTO-TCP-HF / app.py
ishworrsubedii's picture
add: async image upload, nto optimize
db9ae22
raw
history blame
767 Bytes
"""
project @ NTO-TCP-HF
created @ 2024-10-28
author @ github.com/ishworrsubedii
"""
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from src.api.image_prep_api import preprocessing_router
from src.api.nto_api import nto_cto_router
from src.api.image_regeneration_api import image_regeneration_router
app = FastAPI()
app.include_router(nto_cto_router, tags=["NTO-CTO"])
app.include_router(preprocessing_router, tags=["Image-Preprocessing"])
app.include_router(image_regeneration_router, tags=["Image-Regeneration"])
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
if __name__ == '__main__':
import uvicorn
uvicorn.run(app)