File size: 1,213 Bytes
0e7d289
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def recommend_accessories(style_label):
    style_label = style_label.lower()

    # Define style groups and their recommendations
    style_groups = {
        "suit": [
            "tie", "cufflinks", "polished dress shoes", "pocket square", "leather belt", "stylish watch"
        ],
        "casual": [
            "trendy sneakers", "denim jackets", "baseball cap"
        ],
        "formal": [
            "elegant watches", "leather belts", "cufflinks"
        ],
        "bohemian": [
            "layered necklaces", "floppy hats", "fringe bags"
        ],
        "sporty": [
            "wristbands", "running shoes", "sweat-wicking fabrics"
        ],
        "vintage": [
            "pearl earrings", "brooches", "classic handbags"
        ]
    }

    # Try to find the best matching group based on keywords in the style_label
    for group, accessories in style_groups.items():
        if group in style_label:
            rec = ", ".join(accessories)
            return f"Try these accessories to complement your {group} style: {rec}."

    # Default recommendation if no group matched
    return "Try some trendy accessories like sunglasses and a stylish belt."