File size: 582 Bytes
4d6e8c2
 
0ee5862
4d6e8c2
 
 
 
 
 
 
 
ab3fccf
 
 
 
4d6e8c2
0ee5862
 
4d6e8c2
 
 
 
 
 
0ee5862
4d6e8c2
0ee5862
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
from fastapi import FastAPI
from dotenv import load_dotenv
from tasks import text

# Load environment variables
load_dotenv()

app = FastAPI(
    title="Frugal AI Challenge API",
    description="API for the Frugal AI Challenge evaluation endpoints"
)

@app.get("/health")
async def health_check():
    return {"status": "ok"}

# Include text router
app.include_router(text.router)

@app.get("/")
async def root():
    return {
        "message": "Welcome to the Frugal AI Challenge API",
        "endpoints": {
            "text": "/text - Text classification task"
        }
    }