Update README.md
Browse files
README.md
CHANGED
|
@@ -121,9 +121,9 @@ from huggingface_hub import hf_hub_download
|
|
| 121 |
from sklearn.preprocessing import LabelEncoder
|
| 122 |
|
| 123 |
# Load models and preprocessor
|
| 124 |
-
preprocessor_path = hf_hub_download(repo_id='
|
| 125 |
-
numerical_model_path = hf_hub_download(repo_id='
|
| 126 |
-
categorical_model_path = hf_hub_download(repo_id='
|
| 127 |
|
| 128 |
preprocessor = load(preprocessor_path)
|
| 129 |
numerical_model = load(numerical_model_path)
|
|
@@ -166,7 +166,7 @@ numerical_targets = [
|
|
| 166 |
]
|
| 167 |
|
| 168 |
# Load label encoders
|
| 169 |
-
label_encoders = {col: load(hf_hub_download(repo_id='
|
| 170 |
|
| 171 |
def make_predictions(input_data):
|
| 172 |
# Convert input data to DataFrame
|
|
|
|
| 121 |
from sklearn.preprocessing import LabelEncoder
|
| 122 |
|
| 123 |
# Load models and preprocessor
|
| 124 |
+
preprocessor_path = hf_hub_download(repo_id='DNgigi/FertiliserApplication', filename='preprocessor.joblib')
|
| 125 |
+
numerical_model_path = hf_hub_download(repo_id='DNgigi/FertiliserApplication', filename='numerical_model.joblib')
|
| 126 |
+
categorical_model_path = hf_hub_download(repo_id='DNgigi/FertiliserApplication', filename='categorical_model.joblib')
|
| 127 |
|
| 128 |
preprocessor = load(preprocessor_path)
|
| 129 |
numerical_model = load(numerical_model_path)
|
|
|
|
| 166 |
]
|
| 167 |
|
| 168 |
# Load label encoders
|
| 169 |
+
label_encoders = {col: load(hf_hub_download(repo_id='DNgigi/FertiliserApplication', filename=f'label_encoder_{col}.joblib')) for col in categorical_targets}
|
| 170 |
|
| 171 |
def make_predictions(input_data):
|
| 172 |
# Convert input data to DataFrame
|