GodfreyOwino's picture
Update README.md
58c7bce verified
|
raw
history blame contribute delete
No virus
768 Bytes
metadata
tags:
  - npk-prediction
  - xgboost

NPK Prediction Model

This model predicts the Nitrogen, Phosphorus, and Potassium needs for crops based on various input features.

Usage

from transformers import AutoConfig, AutoModel

# Load the model
config = AutoConfig.from_pretrained("GodfreyOwino/NPK_prediction_model2", trust_remote_code=True)
model = AutoModel.from_pretrained("GodfreyOwino/NPK_prediction_model2", config=config, trust_remote_code=True)

input_data = {
    'crop_name': ['maize (corn)'],
    'target_yield': [150],
    'field_size': [10],
    'ph': [6.5],
    'organic_carbon': [1.2],
    'nitrogen': [0.15],
    'phosphorus': [20],
    'potassium': [150],
    'soil_moisture': [30]
}

prediction = model(input_data)
print(prediction)