Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -19,7 +19,7 @@ model_cache = {}
|
|
| 19 |
def load_model():
|
| 20 |
global model
|
| 21 |
try:
|
| 22 |
-
model = YOLO("models/
|
| 23 |
model_cache["anemia_detection_yolov8"] = model
|
| 24 |
print("Default model (anemia_detection_yolov8) successfully loaded")
|
| 25 |
except Exception as e:
|
|
@@ -30,6 +30,7 @@ MODEL_PATHS = {
|
|
| 30 |
"generic_detection_yolov8": "models/PixCellv1.pt",
|
| 31 |
"parasite_detection_yolov8": "models/parasite_detection_yolov8.onnx",
|
| 32 |
"anemia_detection_yolov8": "models/anemia_detection_yolov8.onnx",
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
@app.post("/predict")
|
|
|
|
| 19 |
def load_model():
|
| 20 |
global model
|
| 21 |
try:
|
| 22 |
+
model = YOLO("models/anemia_detection_yolov8.onnx")
|
| 23 |
model_cache["anemia_detection_yolov8"] = model
|
| 24 |
print("Default model (anemia_detection_yolov8) successfully loaded")
|
| 25 |
except Exception as e:
|
|
|
|
| 30 |
"generic_detection_yolov8": "models/PixCellv1.pt",
|
| 31 |
"parasite_detection_yolov8": "models/parasite_detection_yolov8.onnx",
|
| 32 |
"anemia_detection_yolov8": "models/anemia_detection_yolov8.onnx",
|
| 33 |
+
"malaria_detection_yolov8": "models/malaria_detection_yolov8.onnx",
|
| 34 |
}
|
| 35 |
|
| 36 |
@app.post("/predict")
|