anindya-hf-2002 commited on
Commit
7e58e02
·
verified ·
1 Parent(s): 8948981

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,13 +4,13 @@ import numpy as np
4
 
5
  # Load the trained models
6
  with open('rf_crop.pkl', 'rb') as file:
7
- crop_model = pickle.load(file)
8
 
9
  with open('knn_fertilizer.pkl', 'rb') as file:
10
- fertilizer_model = pickle.load(file)
11
 
12
  with open('Scaler_fertilizer.pkl', 'rb') as file: # Assuming you saved the scaler during model training
13
- scaler = pickle.load(file)
14
 
15
  # Label Encoders for the models
16
  crop_label_encoder = {
 
4
 
5
  # Load the trained models
6
  with open('rf_crop.pkl', 'rb') as file:
7
+ crop_model = pickle.load(file, errors='ignore')
8
 
9
  with open('knn_fertilizer.pkl', 'rb') as file:
10
+ fertilizer_model = pickle.load(file, errors='ignore')
11
 
12
  with open('Scaler_fertilizer.pkl', 'rb') as file: # Assuming you saved the scaler during model training
13
+ scaler = pickle.load(file, errors='ignore')
14
 
15
  # Label Encoders for the models
16
  crop_label_encoder = {