Add main.py

This commit is contained in:
2026-01-12 14:16:14 +00:00
parent be36658b0c
commit 000510e102

10
main.py Normal file
View File

@@ -0,0 +1,10 @@
from fastapi import FastAPI, UploadFile
from extract import extract_weight_report
app = FastAPI()
@app.post("/extract")
async def extract(file: UploadFile, lab: str):
text = (await file.read()).decode("utf-8")
data = extract_weight_report(text, lab)
return data