csankaran3 commited on
Commit
5d5ade2
·
verified ·
1 Parent(s): e6c9914

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -60,9 +60,8 @@ def predict_sales_batch():
60
  predicted_sales = [round(float(sales),2) for sales in model.predict(input_data).tolist()]
61
 
62
  # Create a dictionary of predictions with Product ID and Predicted sales
63
- #product_id = input_data['Product_ID'].tolist() # Assuming id as the key or product id
64
- #output_dict = dict(zip(product_id, predicted_sales)) # Sales value
65
- output_dict = dict(predicted_sales) # Sales value
66
 
67
  # Return the predictions dictionary as a JSON response
68
  return output_dict
 
60
  predicted_sales = [round(float(sales),2) for sales in model.predict(input_data).tolist()]
61
 
62
  # Create a dictionary of predictions with Product ID and Predicted sales
63
+ product_id = input_data['Product_ID'].tolist() # Assuming id as the key or product id
64
+ output_dict = dict(zip(product_id, predicted_sales)) # Sales value
 
65
 
66
  # Return the predictions dictionary as a JSON response
67
  return output_dict