Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -88,7 +88,7 @@ async def predict_plant_disease(plant_name: str, file: UploadFile = File(...)):
|
|
| 88 |
raise HTTPException(status_code=400, detail="Invalid plant name")
|
| 89 |
|
| 90 |
# Construct the model path
|
| 91 |
-
|
| 92 |
if plant_name == "Rice":
|
| 93 |
model = load_model(model_path)
|
| 94 |
else:
|
|
|
|
| 88 |
raise HTTPException(status_code=400, detail="Invalid plant name")
|
| 89 |
|
| 90 |
# Construct the model path
|
| 91 |
+
model_path = os.path.join(MODEL_DIRECTORY, f"model_{plant_name}.keras")
|
| 92 |
if plant_name == "Rice":
|
| 93 |
model = load_model(model_path)
|
| 94 |
else:
|