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