# main.py from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from huggingface_hub import login from config import settings from routers import tool_bpy_doc, tool_gpu_checker, tool_calls, tool_find_related, tool_wiki_search login(settings.huggingface_key) app = FastAPI(openapi_url="/api/v1/openapi.json", docs_url="/api/v1/docs") app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"], allow_credentials=True, ) app.include_router( tool_bpy_doc.router, prefix="/api/v1", tags=["Tools"]) app.include_router( tool_gpu_checker.router, prefix="/api/v1", tags=["Tools"]) app.include_router( tool_find_related.router, prefix="/api/v1", tags=["Tools"]) app.include_router( tool_wiki_search.router, prefix="/api/v1", tags=["Tools"]) app.include_router( tool_calls.router, prefix="/api/v1", tags=["Function Calls"]) @app.get("/", response_class=HTMLResponse) async def root(): return """ My Endpoints

Welcome to @mano-wii API

Click the button below to access the documentation:

""" app.mount("/api/v1/static", StaticFiles(directory="static"), name="static")