Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def predict_store_total_sales_batch():
|
|
| 86 |
predicted_store_total_sales = [round(float(np.exp(log_total_sales)), 2) for log_total_sales in predicted_log_total_sales]
|
| 87 |
|
| 88 |
# Create a dictionary of predictions with Product Id as Unique keys for each record
|
| 89 |
-
product_ids = input_data['
|
| 90 |
output_dict = dict(zip(product_ids, predicted_store_total_sales)) # Use actual prices
|
| 91 |
|
| 92 |
# Return the predictions dictionary as a JSON response
|
|
|
|
| 86 |
predicted_store_total_sales = [round(float(np.exp(log_total_sales)), 2) for log_total_sales in predicted_log_total_sales]
|
| 87 |
|
| 88 |
# Create a dictionary of predictions with Product Id as Unique keys for each record
|
| 89 |
+
product_ids = input_data['Product_Id'].tolist() # Assuming 'id' is the Product ID column
|
| 90 |
output_dict = dict(zip(product_ids, predicted_store_total_sales)) # Use actual prices
|
| 91 |
|
| 92 |
# Return the predictions dictionary as a JSON response
|