Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -148,7 +148,7 @@ def batch_predict():
|
|
| 148 |
try:
|
| 149 |
# Calculate derived features
|
| 150 |
current_year = 2025
|
| 151 |
-
store_age = current_year - int(item['Store_Establishment_Year'])
|
| 152 |
price_efficiency = float(item['Product_MRP']) * 0.1
|
| 153 |
|
| 154 |
# Create DataFrame for prediction
|
|
@@ -158,11 +158,9 @@ def batch_predict():
|
|
| 158 |
'Product_Allocated_Area': float(item['Product_Allocated_Area']),
|
| 159 |
'Product_Type': str(item['Product_Type']),
|
| 160 |
'Product_MRP': float(item['Product_MRP']),
|
| 161 |
-
'Store_Id': f'OUT{i+1:03d}', # Unique store ID for batch
|
| 162 |
'Store_Size': str(item['Store_Size']),
|
| 163 |
'Store_Location_City_Type': str(item['Store_Location_City_Type']),
|
| 164 |
'Store_Type': str(item['Store_Type']),
|
| 165 |
-
'Store_Age': store_age,
|
| 166 |
'Price_Efficiency': price_efficiency
|
| 167 |
}])
|
| 168 |
|
|
|
|
| 148 |
try:
|
| 149 |
# Calculate derived features
|
| 150 |
current_year = 2025
|
| 151 |
+
#store_age = current_year - int(item['Store_Establishment_Year'])
|
| 152 |
price_efficiency = float(item['Product_MRP']) * 0.1
|
| 153 |
|
| 154 |
# Create DataFrame for prediction
|
|
|
|
| 158 |
'Product_Allocated_Area': float(item['Product_Allocated_Area']),
|
| 159 |
'Product_Type': str(item['Product_Type']),
|
| 160 |
'Product_MRP': float(item['Product_MRP']),
|
|
|
|
| 161 |
'Store_Size': str(item['Store_Size']),
|
| 162 |
'Store_Location_City_Type': str(item['Store_Location_City_Type']),
|
| 163 |
'Store_Type': str(item['Store_Type']),
|
|
|
|
| 164 |
'Price_Efficiency': price_efficiency
|
| 165 |
}])
|
| 166 |
|