Edit model card

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)
Downloads last month
16
Inference API (serverless) does not yet support model repos that contain custom code.

Space using GodfreyOwino/NPK_prediction_model2 1