Alwin122 commited on
Commit
fff24d8
·
verified ·
1 Parent(s): 7f3cd37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -44,7 +44,7 @@ class SegmentationRequest(BaseModel):
44
 
45
  image_url="https://res.cloudinary.com/dyvuvklpk/image/upload/v1751009512/MEN-Denim-id_00000089-46_7_additional_ow2h0l.png"
46
  #print(hi)
47
- print(image_url)
48
  class SegmentInfo(BaseModel):
49
  class_id: int
50
  class_name: str
@@ -116,7 +116,7 @@ def download_image(url: str) -> Image.Image:
116
  image = image.convert('RGB')
117
 
118
 
119
- print("Image downloaaded succcessfully:",url)
120
 
121
  return image
122
  except Exception as e:
@@ -146,10 +146,7 @@ def get_category_folder(class_id):
146
  """Get appropriate folder for class"""
147
  if class_id in CLOTHING_ITEMS:
148
  return "clothing"
149
- elif class_id in ACCESSORIES:
150
- return "accessories"
151
- elif class_id in BODY_PARTS:
152
- return "body_parts"
153
  else:
154
  return "clothing" # default
155
 
 
44
 
45
  image_url="https://res.cloudinary.com/dyvuvklpk/image/upload/v1751009512/MEN-Denim-id_00000089-46_7_additional_ow2h0l.png"
46
  #print(hi)
47
+
48
  class SegmentInfo(BaseModel):
49
  class_id: int
50
  class_name: str
 
116
  image = image.convert('RGB')
117
 
118
 
119
+ logger.info("Image downloaaded succcessfully:",url)
120
 
121
  return image
122
  except Exception as e:
 
146
  """Get appropriate folder for class"""
147
  if class_id in CLOTHING_ITEMS:
148
  return "clothing"
149
+
 
 
 
150
  else:
151
  return "clothing" # default
152