navpan2 commited on
Commit
9f6582c
·
verified ·
1 Parent(s): b964b3a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
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: