| Soil Fertility Prediction Model | |
| This machine learning model predicts soil fertility status (e.g. fertile or infertile) based on several chemical soil parameters. It was trained using a Random Forest Classifier on real agricultural data. | |
| π§ Model Info | |
| Type: Random Forest Classifier | |
| Framework: Scikit-learn | |
| Input: 13 numerical soil features | |
| Output: Fertility classification with confidence score | |
| π₯ Input Format | |
| The model expects a list of 13 numeric values in the following order: | |
| [ | |
| Nitrogen (N), | |
| Phosphorus (P), | |
| Potassium (K), | |
| Soil Acidity (pH), | |
| Electrical Conductivity (EC), | |
| Organic Carbon (OC), | |
| Sulfur (S), | |
| Zinc (Zn), | |
| Iron (Fe), | |
| Copper (Cu), | |
| Manganese (Mn), | |
| Boron (B) | |
| ] | |
| Example: | |
| { | |
| "inputs": [12.0, 5.5, 20.0, 6.7, 1.1, 0.6, 10.0, 1.2, 4.1, 0.4, 3.3, 0.2, 0.5] | |
| } | |
| β οΈ Note: The input must be a JSON object with the key "inputs" and a list of exactly 13 values. | |
| π€ Output Format | |
| The model returns a list with one dictionary containing the predicted label and a confidence score. | |
| Example output: | |
| [ | |
| { | |
| "label": "fertile", | |
| "score": 0.92 | |
| } | |
| ] | |
| π¦ Files Included | |
| random_forest_pkl.pkl β The trained model | |
| inference.py β Required for Hugging Face model hub to run inference | |
| requirements.txt β Python dependencies | |
| README.md β This file | |
| π Requirements | |
| Python packages needed (also listed in requirements.txt): | |
| scikit-learn | |
| numpy | |
| π§ Usage | |
| This model can be used via the Hugging Face Inference API once uploaded to the Model Hub. | |