zelotech / app.py
williamufpr
🚧 Update app.py
cf8465e
Raw History Blame Contribute Delete
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=["*"],
)
@app.get("/")
def root():
return {
"service": "Documment Inspector",
"status": "running"
}
@app.get("/health")
def health():
return {
"status": "ok"
}
@app.post("/analyze")
async def analyze_document(file: UploadFile = File(...)):
content = await file.read()
return {
"filename": file.filename,
greet_json():
return {"Hello": "World!"}