Files
ai-extractor/main.py
2026-01-12 14:16:14 +00:00

11 lines
276 B
Python

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