CodingBuddy commited on
Commit
8adb9eb
·
verified ·
1 Parent(s): b7c2a24

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -43,16 +43,16 @@ def predict_sales():
43
  # You MUST use the *trained* encoder to transform the new data
44
  # encoded_new_data = encoder.transform(input_data[['Product_Sugar_Content','Product_Type','Store_Id','Store_Size','Store_Location_City_Type','Store_Type']])
45
 
46
- encoded_new_data = pd.get_dummies(
47
- input_data,
48
- columns=['Product_Sugar_Content','Product_Type','Store_Id','Store_Size','Store_Location_City_Type','Store_Type'],
49
- drop_first=True,
50
- );
51
- print("The data entered are below")
52
- print(encoded_new_data)
53
 
54
  # Make a Sales prediction using the trained model
55
- prediction = model.predict(encoded_new_data).tolist()[0]
56
 
57
  #Calculate the actual price
58
  predicted_sales = np.exp(prediction)
 
43
  # You MUST use the *trained* encoder to transform the new data
44
  # encoded_new_data = encoder.transform(input_data[['Product_Sugar_Content','Product_Type','Store_Id','Store_Size','Store_Location_City_Type','Store_Type']])
45
 
46
+ #encoded_new_data = pd.get_dummies(
47
+ # input_data,
48
+ # columns=['Product_Sugar_Content','Product_Type','Store_Id','Store_Size','Store_Location_City_Type','Store_Type'],
49
+ # drop_first=True,
50
+ #);
51
+ #print("The data entered are below")
52
+ #print(encoded_new_data)
53
 
54
  # Make a Sales prediction using the trained model
55
+ prediction = model.predict(input_data).tolist()[0]
56
 
57
  #Calculate the actual price
58
  predicted_sales = np.exp(prediction)