skibi11 commited on
Commit
6aa2786
·
verified ·
1 Parent(s): a4d01ce

remove display error

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -73,6 +73,14 @@ def run_leukocoria_prediction(iris_crop):
73
  # --- 3. FastAPI Application ---
74
  app = FastAPI()
75
 
 
 
 
 
 
 
 
 
76
  @app.post("/detect/")
77
  async def full_detection_pipeline(image: UploadFile = File(...)):
78
  with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as tmp:
 
73
  # --- 3. FastAPI Application ---
74
  app = FastAPI()
75
 
76
+ # --- remove display error ---
77
+ @app.get("/")
78
+ def read_root():
79
+ return {
80
+ "status": "LeukoLook API is running",
81
+ "documentation": "Send a POST request to the /detect/ endpoint with an image file."
82
+ }
83
+
84
  @app.post("/detect/")
85
  async def full_detection_pipeline(image: UploadFile = File(...)):
86
  with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as tmp: