Sathvik-kota commited on
Commit
937cb53
·
verified ·
1 Parent(s): c62a9fc

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -712,3 +712,15 @@ def health_check():
712
  if not GEMINI_API_KEY or genai is None:
713
  msg += " (No GEMINI_API_KEY/configured SDK — LLM refinement skipped.)"
714
  return {"status": "ok", "message": msg, "hint": "POST /extract-bill-data with {'document':'<url>'}"}
 
 
 
 
 
 
 
 
 
 
 
 
 
712
  if not GEMINI_API_KEY or genai is None:
713
  msg += " (No GEMINI_API_KEY/configured SDK — LLM refinement skipped.)"
714
  return {"status": "ok", "message": msg, "hint": "POST /extract-bill-data with {'document':'<url>'}"}
715
+
716
+ from fastapi import BackgroundTasks
717
+
718
+ @app.get("/run-all-samples")
719
+ async def run_all_samples(background: BackgroundTasks):
720
+ def task():
721
+ import run_all_samples
722
+ run_all_samples.main()
723
+
724
+ background.add_task(task)
725
+ return {"status": "started", "message": "Running extraction on all 15 samples in background."}
726
+