c
File size: 1,149 Bytes
17c5137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from artifacts import crop_model_path, crop_transformer_path, crop_target_encoder_path
from artifacts import fertilizer_model_path, fertilizer_transformer_path, fertilizer_target_encoder_path
from artifacts import plant_diseases_classifier_model_path

from utils import load_model_and_encoders
from ultralytics import YOLO

crop_model, crop_pipeline_encoder, crop_label_encoder = load_model_and_encoders(model_path=crop_model_path, 
                                                                                transformer_path=crop_transformer_path,
                                                                                target_encoder_path=crop_target_encoder_path)

fertilizer_model, fertilizer_pipeline_encoder, fertilizer_label_encoder = load_model_and_encoders(model_path=fertilizer_model_path, 
                                                                                transformer_path=fertilizer_transformer_path,
                                                                                target_encoder_path=fertilizer_target_encoder_path)

plant_diseases_classifier_model = YOLO(plant_diseases_classifier_model_path)