Arafath10 commited on
Commit
9cc418e
1 Parent(s): e7ab121

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -1
main.py CHANGED
@@ -165,7 +165,8 @@ def forecast(monthly_sales):
165
 
166
  def process_product(product_name, data):
167
  full_trend = ""
168
-
 
169
  sub_sku = data['sub_sku'].tolist()[0]
170
  try:
171
  # Get today's date
@@ -196,6 +197,8 @@ def process_product(product_name, data):
196
  return {
197
  "sub_sku": sub_sku,
198
  "Product Name": product_name,
 
 
199
  "next_month": str(result_dict["next_month"]),
200
  "predicted_count": result_dict["predicted_count"]
201
  #"full_trend" : str(full_trend)
@@ -204,6 +207,8 @@ def process_product(product_name, data):
204
  return {
205
  "sub_sku": sub_sku,
206
  "Product Name": product_name,
 
 
207
  "next_month": str(e),
208
  "predicted_count": "not predicted"
209
  #"full_trend" : str(full_trend)
 
165
 
166
  def process_product(product_name, data):
167
  full_trend = ""
168
+ brand_name = data['brand_name'].tolist()[0]
169
+ product_image = data['product_image'].tolist()[0]
170
  sub_sku = data['sub_sku'].tolist()[0]
171
  try:
172
  # Get today's date
 
197
  return {
198
  "sub_sku": sub_sku,
199
  "Product Name": product_name,
200
+ "brand_name" : brand_name,
201
+ "product_image" : f"http://app.storematepro.lk/img/{product_image}",
202
  "next_month": str(result_dict["next_month"]),
203
  "predicted_count": result_dict["predicted_count"]
204
  #"full_trend" : str(full_trend)
 
207
  return {
208
  "sub_sku": sub_sku,
209
  "Product Name": product_name,
210
+ "brand_name" : brand_name,
211
+ "product_image" : f"http://app.storematepro.lk/img/{product_image}",
212
  "next_month": str(e),
213
  "predicted_count": "not predicted"
214
  #"full_trend" : str(full_trend)