Describe the bug
The Flask app currently uses YieldModel with np.random.uniform(...), so predictions are random and not based on actual trained artifacts. This makes the feature unreliable and not production‑ready.
To Reproduce
Load the real model and encoders (xgb_crop_model.pkl, Crop_encoder.pkl, Season_encoder.pkl, State_encoder.pkl).
Use properly encoded inputs for inference in /predict.
Handle unknown crop/season/state values with clear validation errors.
Ensure the existing /download_report flow continues to work.
Expected behavior
Same input returns deterministic, model‑based output (not random).
/predict uses loaded artifacts successfully.
Invalid categorical inputs return user‑friendly error messages.
No regression in existing form submission and report download behavior.
Additional context
No response
Describe the bug
The Flask app currently uses YieldModel with np.random.uniform(...), so predictions are random and not based on actual trained artifacts. This makes the feature unreliable and not production‑ready.
To Reproduce
Load the real model and encoders (xgb_crop_model.pkl, Crop_encoder.pkl, Season_encoder.pkl, State_encoder.pkl).
Use properly encoded inputs for inference in /predict.
Handle unknown crop/season/state values with clear validation errors.
Ensure the existing /download_report flow continues to work.
Expected behavior
Same input returns deterministic, model‑based output (not random).
/predict uses loaded artifacts successfully.
Invalid categorical inputs return user‑friendly error messages.
No regression in existing form submission and report download behavior.
Additional context
No response