Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 = {
|