koenverhagen commited on
Commit
59c200d
1 Parent(s): 37bf5fe

Update createlookalike.py

Browse files
Files changed (1) hide show
  1. createlookalike.py +4 -2
createlookalike.py CHANGED
@@ -61,7 +61,7 @@ def get_image(url):
61
  def load_image(url, img_id):
62
  # print('get image url', id)
63
  request_url = '{}/flat_thumb/{}/1/224'.format(url, img_id)
64
- # print('get image', request_url)
65
  img, x = get_image(request_url)
66
  return img, x
67
 
@@ -87,6 +87,7 @@ async def calculate_shop(shop: Shop, feat_extractor) -> None:
87
 
88
  design_json = {}
89
  if len(list_ids) > 0:
 
90
  for l in list_ids:
91
 
92
  try:
@@ -98,7 +99,7 @@ async def calculate_shop(shop: Shop, feat_extractor) -> None:
98
 
99
  except Exception as e:
100
  print(l, ' failed loading feature extraction', e)
101
-
102
  try:
103
  features = np.array(features)
104
  # print(features.shape)
@@ -145,6 +146,7 @@ async def calculate_shop(shop: Shop, feat_extractor) -> None:
145
  print("error sending recommendations")
146
 
147
  # if calculation is ready send update home
 
148
  if await update_calculation_date(shop):
149
  pass
150
  else:
 
61
  def load_image(url, img_id):
62
  # print('get image url', id)
63
  request_url = '{}/flat_thumb/{}/1/224'.format(url, img_id)
64
+ print('get image', request_url)
65
  img, x = get_image(request_url)
66
  return img, x
67
 
 
87
 
88
  design_json = {}
89
  if len(list_ids) > 0:
90
+ print(f"step1: {datetime.now()}")
91
  for l in list_ids:
92
 
93
  try:
 
99
 
100
  except Exception as e:
101
  print(l, ' failed loading feature extraction', e)
102
+ print(f"step2: {datetime.now()}")
103
  try:
104
  features = np.array(features)
105
  # print(features.shape)
 
146
  print("error sending recommendations")
147
 
148
  # if calculation is ready send update home
149
+ print(f"step3: {datetime.now()}")
150
  if await update_calculation_date(shop):
151
  pass
152
  else: