deepacsr commited on
Commit
809f64e
·
verified ·
1 Parent(s): 434cbf4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -78,7 +78,7 @@ def predict_sales_batch():
78
  and returns the predicted product sales prices as a dictionary in the JSON response.
79
  """
80
 
81
- #print(">>> Batch endpoint invoked!", flush=True)
82
  product_sales_predictor_api.logger.info('Batch endpoint invoked')
83
 
84
  # Get the uploaded CSV file from the request
@@ -99,7 +99,7 @@ def predict_sales_batch():
99
  ]
100
 
101
  # Drop only columns that exist in the CSV
102
- input_data = df.drop(columns=[c for c in drop_cols if c in input_data.columns])
103
 
104
  # Now df contains ONLY the features used for training
105
  predictions = model.predict(input_data)
 
78
  and returns the predicted product sales prices as a dictionary in the JSON response.
79
  """
80
 
81
+ print(">>> Batch endpoint invoked!", flush=True)
82
  product_sales_predictor_api.logger.info('Batch endpoint invoked')
83
 
84
  # Get the uploaded CSV file from the request
 
99
  ]
100
 
101
  # Drop only columns that exist in the CSV
102
+ input_data = input_data.drop(columns=[c for c in drop_cols if c in input_data.columns])
103
 
104
  # Now df contains ONLY the features used for training
105
  predictions = model.predict(input_data)