File size: 671 Bytes
75f3c1e
 
cf8465e
 
 
 
75f3c1e
cf8465e
 
 
 
 
 
 
75f3c1e
cf8465e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75f3c1e
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
28
29
30
31
32
33
34
35
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!"}