Download src/fusion/app.py from Shorx/DCA-01: direct link, hf CLI and curl.
- Browser
- Download file 396 Bytes
-
https://huggingface.co/Shorx/DCA-01/resolve/main/src/fusion/app.py
- Command line
-
hf download hf://Shorx/DCA-01/src/fusion/app.py
-
curl -L -o app.py https://huggingface.co/Shorx/DCA-01/resolve/main/src/fusion/app.py
396 Bytes
| from fastapi import FastAPI | |
| from pydantic import BaseModel | |
| from typing import List, Dict | |
| from fusion import fuse | |
| app = FastAPI(title="DCA-01 Fusion") | |
| class FusionRequest(BaseModel): | |
| dag_id: str | |
| expert_outputs: List[Dict] | |
| def fuse_endpoint(req: FusionRequest): | |
| return fuse(req.expert_outputs, req.dag_id) | |
| def health(): | |
| return {"status":"ok"} | |