anithajk commited on
Commit
42c22d4
·
verified ·
1 Parent(s): 1d66d59

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -81,9 +81,13 @@ def predict_product_sale_price_batch():
81
  predicted_prices = [round(float(np.exp(total_sale_price)), 2) for total_sale_price in predicted_Product_Store_Sales_Total]
82
 
83
  # Create a dictionary of predictions with product IDs as keys
84
- product_ids = input_data['id'].tolist() # Assuming 'id' is the product ID column
85
  output_dict = dict(zip(product_ids, predicted_prices)) # Use actual prices
86
 
 
 
 
 
87
  # Return the predictions dictionary as a JSON response
88
  return output_dict
89
 
 
81
  predicted_prices = [round(float(np.exp(total_sale_price)), 2) for total_sale_price in predicted_Product_Store_Sales_Total]
82
 
83
  # Create a dictionary of predictions with product IDs as keys
84
+ product_ids = input_data['Product_Id'].tolist() # Assuming 'id' is the product ID column
85
  output_dict = dict(zip(product_ids, predicted_prices)) # Use actual prices
86
 
87
+ # Create a dictionary of predictions with Store IDs as keys
88
+ store_ids = input_data['Store_Id'].tolist()
89
+ output_dict = dict(zip(store_ids, predicted_prices)) # Use actual prices
90
+
91
  # Return the predictions dictionary as a JSON response
92
  return output_dict
93