Spaces:
Sleeping
Sleeping
Update app.py
Browse files147 unmodified lines148149150151152153147 unmodified lines# --- Core Logic ---def analyze_outfit(input_img: Image.Image):if input_img is None:return ("<p style='color: #FF5555; text-align: center;'>Please upload an image.</p>",None, "Error: No image provided.")147 unmodified lines148149150151152153154155156157158147 unmodified lines# --- Core Logic ---def analyze_outfit(input_img: Image.Image):if isinstance(input_img, str): # If receiving filepath from APIinput_img = Image.open(input_img)if isinstance(input_img, np.ndarray): # If receiving numpy arrayinput_img = Image.fromarray(input_img.astype('uint8'))if input_img is None:return ("<p style='color: #FF5555; text-align: center;'>Please upload an image.</p>",None, "Error: No image provided.")
app.py+5