pal14 commited on
Commit
e87f8d3
·
verified ·
1 Parent(s): 8b1c9d2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. superkart_backend.py +24 -22
superkart_backend.py CHANGED
@@ -31,32 +31,35 @@ def forecast_sales():
31
  property_data = request.get_json()
32
 
33
  # Extract relevant features from the JSON data
34
- # sample = {
35
- # 'Product_Weight': property_data['Product_Weight'],
36
- # 'Product_Sugar_Content': property_data['Product_Sugar_Content'],
37
- # 'Product_Allocated_Area': property_data['Product_Allocated_Area'],
38
- # 'Product_Type': property_data['Product_Type'],
39
- # 'Product_MRP': property_data['Product_MRP'],
40
- # 'Store_Id': property_data['Store_Id'],
41
- # 'Store_Establishment_Year': property_data['Store_Establishment_Year'],
42
- # 'Store_Size': property_data['Store_Size'],
43
- # 'Store_Location_City_Type': property_data['Store_Location_City_Type'],
44
- # 'Store_Type': property_data['Store_Type']
45
- # }
46
-
47
  sample = {
48
- 'Product_Weight': 12.66,
49
- 'Product_Sugar_Content': 'Low Sugar',
50
- 'Product_Allocated_Area': 0.027,
 
 
 
51
  'Product_Type': 'Frozen Foods',
52
  'Product_MRP': 117.08,
53
- 'Store_Id': 'OUT004',
54
- 'Store_Establishment_Year': 2009,
55
- 'Store_Size': 'Medium',
56
- 'Store_Location_City_Type': 'Tier 2',
57
- 'Store_Type': 'Supermarket Type2'
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  # Convert the extracted data into a Pandas DataFrame
61
  input_data = pd.DataFrame([sample])
62
 
@@ -85,7 +88,6 @@ def forecast_sales_batch():
85
 
86
  # Read the CSV file into a Pandas DataFrame
87
  input_data = pd.read_csv(file)
88
- print("HELOOOOOOO")
89
  print(input_data.head())
90
 
91
  # Make predictions for all stores
 
31
  property_data = request.get_json()
32
 
33
  # Extract relevant features from the JSON data
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  sample = {
35
+ 'Product_Weight': property_data['Product_Weight'],
36
+ 'Product_Sugar_Content': property_data['Product_Sugar_Content'],
37
+ # 'Product_Allocated_Area': property_data['Product_Allocated_Area'],
38
+ # 'Product_Type': property_data['Product_Type'],
39
+ # 'Product_MRP': property_data['Product_MRP'],
40
+ 'Product_Allocated_Area': 0.027,
41
  'Product_Type': 'Frozen Foods',
42
  'Product_MRP': 117.08,
43
+ 'Store_Id': property_data['Store_Id'],
44
+ 'Store_Establishment_Year': property_data['Store_Establishment_Year'],
45
+ 'Store_Size': property_data['Store_Size'],
46
+ 'Store_Location_City_Type': property_data['Store_Location_City_Type'],
47
+ 'Store_Type': property_data['Store_Type']
48
  }
49
 
50
+ # sample = {
51
+ # 'Product_Weight': 12.66,
52
+ # 'Product_Sugar_Content': 'Low Sugar',
53
+ # 'Product_Allocated_Area': 0.027,
54
+ # 'Product_Type': 'Frozen Foods',
55
+ # 'Product_MRP': 117.08,
56
+ # 'Store_Id': 'OUT004',
57
+ # 'Store_Establishment_Year': 2009,
58
+ # 'Store_Size': 'Medium',
59
+ # 'Store_Location_City_Type': 'Tier 2',
60
+ # 'Store_Type': 'Supermarket Type2'
61
+ # }
62
+
63
  # Convert the extracted data into a Pandas DataFrame
64
  input_data = pd.DataFrame([sample])
65
 
 
88
 
89
  # Read the CSV file into a Pandas DataFrame
90
  input_data = pd.read_csv(file)
 
91
  print(input_data.head())
92
 
93
  # Make predictions for all stores