-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.py
More file actions
41 lines (25 loc) · 748 Bytes
/
application.py
File metadata and controls
41 lines (25 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Author: Walter Shewmake <walter.shewmake@utahtech.edu>
Date: 05-19-2024
Project: Arbitrary Hierarchical Classifier
Client: Zonos
Affiliation: Utah Tech University
This module is part of the Arbitrary Hierarchical Classification Application developed for Zonos.
"""
from fastapi import FastAPI
from api.routers import hierarchy_router, classify_router
def create_app():
"""Create the FastAPI app."""
_app = FastAPI()
_app.include_router(hierarchy_router)
_app.include_router(classify_router)
return _app
app = create_app()
@app.get("/ping")
def index() -> str:
"""Health check endpoint."""
return "pong!"
@app.get("/")
def health_check() -> str:
"""Health check endpoint."""
return "Healthy!"