| | from fastapi import FastAPI |
| | from fastapi.middleware.cors import CORSMiddleware |
| | from app.api.routers.v1 import outfitmatch, health, tryon, occasion, whatfits, size_comparision, mannequin, detail_shots,two_object_size,background_edit,multi_view,editorial |
| | import logging |
| |
|
| | |
| | logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(levelname)s %(name)s: %(message)s") |
| |
|
| | app = FastAPI( |
| | title="Vendor Usecase App", |
| | description="API for various vendor usecases including outfit matching.", |
| | version="0.1.0", |
| | debug=True, |
| | ) |
| |
|
| | |
| | app.add_middleware( |
| | CORSMiddleware, |
| | allow_origins=["*"], |
| | allow_credentials=True, |
| | allow_methods=["*"], |
| | allow_headers=["*"], |
| | ) |
| |
|
| | |
| | app.include_router(outfitmatch.router, prefix="/api/v1", tags=["Outfit Match"]) |
| | app.include_router(tryon.router, prefix="/api/v1", tags=["TRY-ON"]) |
| | app.include_router(occasion.router, prefix="/api/v1", tags=["occasion-based-styling"]) |
| | app.include_router(whatfits.router, prefix="/api/v1", tags=["what-fits"]) |
| | app.include_router(size_comparision.router, prefix="/api/v1", tags=["size-comparision"]) |
| | app.include_router(two_object_size.router, prefix="/api/v1", tags=["wallet-size-comparision"]) |
| | app.include_router(mannequin.router, prefix="/api/v1", tags=["MANNEQUIN"]) |
| | app.include_router(detail_shots.router, prefix="/api/v1", tags=["details-shots"]) |
| | app.include_router(health.router, prefix="/api/v1", tags=["Health"]) |
| | app.include_router(background_edit.router, prefix="/api/v1", tags = ["Background_edit"]) |
| | app.include_router(multi_view.router, prefix="/api/v1", tags = ["Multi_view"]) |
| | app.include_router(editorial.router, prefix="/api/v1", tags = ["Editorial"]) |
| |
|
| |
|
| | if __name__ == "__main__": |
| | import uvicorn |
| | uvicorn.run("main:app", host="127.0.0.1", port=5350, reload=True) |
| |
|