From 000510e10268450dd3084e3712354444bb321821 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 12 Jan 2026 14:16:14 +0000 Subject: [PATCH] Add main.py --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..9ff436a --- /dev/null +++ b/main.py @@ -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