raviix46 commited on
Commit
ac31da4
Β·
verified Β·
1 Parent(s): 289342c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +130 -1
README.md CHANGED
@@ -7,7 +7,136 @@ sdk: gradio
7
  sdk_version: 5.38.2
8
  app_file: app.py
9
  pinned: false
 
10
  license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  sdk_version: 5.38.2
8
  app_file: app.py
9
  pinned: false
10
+ short_description: AI Shopping Assistant, Locator & Smart Suggestions
11
  license: mit
12
  ---
13
 
14
+ # πŸ›οΈ RetailGenie – In-Store Smart Assistant
15
+
16
+ **RetailGenie** is an AI-powered shopping assistant that helps users **locate in-store products** using dropdown filters and get **intelligent product suggestions** based on natural language queries. Built with Gradio and sample retail data, this project simulates a real-time in-store assistant combining **rule-based filtering** with **FLAN-T5-based AI recommendations**.
17
+
18
+ > ⚠️ This project is for **educational and demonstration purposes only**. Product data is mock/simulated and may not reflect real-time inventory.
19
+
20
+ ---
21
+
22
+ ## 🌐 Try Live on Hugging Face
23
+
24
+ RetailGenie is live and accessible via Hugging Face Spaces:
25
+
26
+ πŸ‘‰ [**Launch RetailGenie on Hugging Face Spaces**](https://huggingface.co/spaces/raviix46/RetailGenie)
27
+
28
+ No setup needed – just visit and start exploring!
29
+
30
+ ---
31
+
32
+ ## ✨ Key Features
33
+
34
+ ### 🧭 Navigator Tab
35
+ - Multi-level dropdown filters:
36
+ - Country β†’ State β†’ City β†’ Store β†’ Category β†’ Product β†’ Brand
37
+ - Displays:
38
+ - βœ… Availability
39
+ - πŸ’° Price
40
+ - 🏬 Floor, πŸͺ‘ Aisle
41
+ - 🎁 Offers
42
+ - Data is dynamically loaded from nested `.csv` files
43
+
44
+ ### 🧠 Smart Suggestions Tab
45
+ - Accepts natural language queries like:
46
+ - `"gift under 500"`, `"shampoo for dry hair"`
47
+ - Filters products based on:
48
+ - Price limits
49
+ - Tags (dry, oily, gift, budget, etc.)
50
+ - Stock status
51
+ - Response is generated using:
52
+ - `google/flan-t5-small` via Hugging Face Transformers
53
+ - Fallback to hardcoded suggestions if no match is found
54
+
55
+ ---
56
+
57
+ ## 🧠 System Architecture
58
+
59
+ ```text
60
+ User Input (Dropdown / Text)
61
+ β”‚
62
+ β”œβ”€β”€ Navigator Tab β†’ File system path chaining β†’ Data lookup β†’ Result
63
+ └── Smart Suggestions β†’ Rule filters + model call β†’ Generated response
64
+
65
+ ---
66
+
67
+ ## πŸ› οΈ Tech Stack
68
+
69
+ | Category | Tool / Library | Purpose |
70
+ |---------------------|--------------------------------------|----------------------------------------------|
71
+ | **Programming Language** | Python 3.10 | Core backend logic and data handling |
72
+ | **Frontend Framework** | Gradio | Web UI with tabs, dropdowns, and text input |
73
+ | **NLP Model** | google/flan-t5-small (via πŸ€— Transformers) | Natural language product recommendations |
74
+ | **Data Handling** | Pandas | Reading, filtering, and managing CSV data |
75
+ | **Deployment** | Hugging Face Spaces | Hosting and public access to the app |
76
+ | **UI Styling** | HTML, CSS (via Gradio Markdown) | Custom styling for layout and response boxes |
77
+ | **Fallback Logic** | Python conditionals + emoji formatting | Default suggestions when model fails |
78
+
79
+ ---
80
+
81
+ ## πŸ“ˆ Example Queries and Outputs
82
+
83
+ ### πŸ”Ή Smart Suggestions Tab (Natural Language)
84
+
85
+ | πŸ’¬ User Query | πŸ€– AI Response (Sample) |
86
+ |------------------------------------------|--------------------------------------------------------------------------------|
87
+ | `shampoo for dry hair under 300` | "You may try Dove Dryness Repair – β‚Ή280, available at Floor 1, Aisle 3." |
88
+ | `gift for brother under 500` | "A perfect gift is our Men’s Grooming Kit – β‚Ή450, available at Floor 2, Aisle 5." |
89
+ | `budget skincare for oily skin` | "Try Clean & Clear Oil Control Face Wash – β‚Ή150, available at Floor 1, Aisle 2." |
90
+ | `face cream above 700` | "You might like Olay Regenerist – β‚Ή899, found at Floor 3, Aisle 7." |
91
+
92
+ ### πŸ”Ή Navigator Tab (Dropdowns)
93
+
94
+ Sample user path:
95
+
96
+ ```
97
+ Country β†’ India
98
+ β†’ State β†’ Karnataka
99
+ β†’ City β†’ Bangalore
100
+ β†’ Store β†’ StoreA
101
+ β†’ Category β†’ Shampoo
102
+ β†’ Product β†’ Dove
103
+ β†’ Brand β†’ Dryness Repair
104
+ β†’ Quantity β†’ 500ml
105
+ ```
106
+
107
+ **Output:**
108
+
109
+ ```
110
+ βœ… In Stock: Yes
111
+ πŸ’° Price: β‚Ή280
112
+ 🏬 Floor: 1
113
+ πŸͺ‘ Aisle: 3
114
+ 🎁 Offer: Buy 1 Get 1 Free
115
+ ```
116
+
117
+ ---
118
+
119
+ ## πŸ§ͺ Run Locally
120
+
121
+ Follow the steps below to set up and run RetailGenie on your machine:
122
+
123
+ ### 1. Clone the Repository
124
+
125
+ ```bash
126
+ git clone https://github.com/your_username/RetailGenie.git
127
+ cd RetailGenie
128
+ ```
129
+
130
+ ### 2. Install Dependencies
131
+
132
+ ```bash
133
+ pip install -r requirements.txt
134
+ ```
135
+
136
+ ### 3. Launch the App
137
+
138
+ ```bash
139
+ python app.py
140
+ ```
141
+
142
+ The app will be available at `http://localhost:7860/`