Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,16 +147,16 @@ def get_top_clip_clothing(probs, n=1):
|
|
| 147 |
return top_items_with_probs
|
| 148 |
|
| 149 |
# --- Core Logic ---
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
def analyze_outfit(image):
|
| 157 |
-
if image is None:
|
| 158 |
-
return ("<p style='color: #FF5555; text-align: center;'>Please upload an image.</p>", None, "Error: No image provided.")
|
| 159 |
-
image = image.convert("RGB").copy()
|
| 160 |
#print(f"[DEBUG] image_path type: {type(image_path)} | value: {image_path}")
|
| 161 |
|
| 162 |
# 1) YOLO Person Detection
|
|
|
|
| 147 |
return top_items_with_probs
|
| 148 |
|
| 149 |
# --- Core Logic ---
|
| 150 |
+
def analyze_outfit(input_img: Image.Image):
|
| 151 |
+
if input_img is None:
|
| 152 |
+
return ("<p style='color: #FF5555; text-align: center;'>Please upload an image.</p>",
|
| 153 |
+
None, "Error: No image provided.")
|
| 154 |
+
|
| 155 |
+
img = input_img.convert("RGB").copy() # Ensure image is in RGB
|
| 156 |
+
#def analyze_outfit(image):
|
| 157 |
+
#if image is None:
|
| 158 |
+
#return ("<p style='color: #FF5555; text-align: center;'>Please upload an image.</p>", None, "Error: No image provided.")
|
| 159 |
+
#image = image.convert("RGB").copy()
|
| 160 |
#print(f"[DEBUG] image_path type: {type(image_path)} | value: {image_path}")
|
| 161 |
|
| 162 |
# 1) YOLO Person Detection
|