Parishri07 commited on
Commit
f3a883b
·
verified ·
1 Parent(s): d1068de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py CHANGED
@@ -61,6 +61,26 @@ def get_product_image(product_name):
61
  lower_name = product_name.strip().lower()
62
  return Image.open(PRODUCT_IMAGE_MAP.get(lower_name, DEFAULT_MAP))
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  def reset_all():
65
  return (
66
  None, None, None, None, None, None, None,
 
61
  lower_name = product_name.strip().lower()
62
  return Image.open(PRODUCT_IMAGE_MAP.get(lower_name, DEFAULT_MAP))
63
 
64
+ # Smart Suggestions Function
65
+ def suggest_items(query):
66
+ query = query.lower()
67
+ if "gift" in query and "500" in query:
68
+ return (
69
+ "🎁 Gift Suggestions under ₹500:\n"
70
+ "1. Bath & Body Gift Set - ₹499\n"
71
+ "2. Mini Perfume Pack - ₹349\n"
72
+ "3. Skin Care Hamper - ₹399\n"
73
+ "4. Chocolates Gift Box - ₹299"
74
+ )
75
+ if "shampoo" in query and "dry" in query:
76
+ return (
77
+ "🧴 Shampoos for Dry Hair:\n"
78
+ "1. Dove 500 ml - ₹325\n"
79
+ "2. Clinic Plus 500 ml - ₹680"
80
+ )
81
+ return "🤷 Sorry, no smart suggestions found. Try asking: 'Gift items under 500' or 'Shampoo for dry hair'"
82
+
83
+
84
  def reset_all():
85
  return (
86
  None, None, None, None, None, None, None,