Spaces:
Running
Running
remove display error
Browse files
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:
|