Download app.py from ZeloTech/zelotech: direct link, hf CLI and curl.
- Browser
- Download file 671 Bytes
-
https://huggingface.co/spaces/ZeloTech/zelotech/resolve/main/app.py
- Command line
-
hf download hf://spaces/ZeloTech/zelotech/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ZeloTech/zelotech/resolve/main/app.py
671 Bytes
| from fastapi import FastAPI | |
| app = FastAPI( | |
| title="ZeloTech API v1", | |
| version="0.1.0" | |
| ) | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| def root(): | |
| return { | |
| "service": "Documment Inspector", | |
| "status": "running" | |
| } | |
| def health(): | |
| return { | |
| "status": "ok" | |
| } | |
| async def analyze_document(file: UploadFile = File(...)): | |
| content = await file.read() | |
| return { | |
| "filename": file.filename, | |
| greet_json(): | |
| return {"Hello": "World!"} |