molinari135 commited on
Commit
586ecd9
·
verified ·
1 Parent(s): ef3bff5

Update product_return_prediction/api.py

Browse files
Files changed (1) hide show
  1. product_return_prediction/api.py +2 -2
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
- # model = load_model(model_path)
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)