Downloads · 30 days
11
6% of all-time downloads
GodfreyOwino/NPK_prediction_model2
NPK_prediction_model2 is a feature extraction model from GodfreyOwino. Use it when you need embeddings to search or compare text. It is set up for transformers.
This model predicts the Nitrogen, Phosphorus, and Potassium needs for crops based on various input features.
Downloads · 30 days
11
6% of all-time downloads
All-time downloads
182
Public
Repo size
130 MB
Likes
0
Public
Click a slice to open those files.
.pkl130 MB · 100%
From the Hugging Face model README
This model predicts the Nitrogen, Phosphorus, and Potassium needs for crops based on various input features.
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)