Update product_return_prediction/api.py
Browse files
product_return_prediction/api.py
CHANGED
@@ -160,9 +160,9 @@ async def predict(products: ProductRequest):
|
|
160 |
# download_file(f"{models_uri}{model_name}", model_path, headers)
|
161 |
# download_file(f"{models_uri}{scaler_name}", scaler_path, headers)
|
162 |
|
163 |
-
|
164 |
|
165 |
-
model = pickle.load(hf_hub_download(repo_id="molinari135/se4ai-models", filename="svm.pkl"))
|
166 |
|
167 |
scaled_inventory = apply_scaling(prepared_inventory, scaler_file)
|
168 |
predictions, probabilities = make_predictions(model, scaled_inventory)
|
|
|
160 |
# download_file(f"{models_uri}{model_name}", model_path, headers)
|
161 |
# download_file(f"{models_uri}{scaler_name}", scaler_path, headers)
|
162 |
|
163 |
+
model = load_model(hf_hub_download(repo_id="molinari135/se4ai-models", filename="svm.pkl"))
|
164 |
|
165 |
+
# model = pickle.load(hf_hub_download(repo_id="molinari135/se4ai-models", filename="svm.pkl"))
|
166 |
|
167 |
scaled_inventory = apply_scaling(prepared_inventory, scaler_file)
|
168 |
predictions, probabilities = make_predictions(model, scaled_inventory)
|