Spaces:
Sleeping
Sleeping
| title: RetailGenie | |
| emoji: ποΈ | |
| colorFrom: yellow | |
| colorTo: gray | |
| sdk: gradio | |
| sdk_version: 5.38.2 | |
| app_file: app.py | |
| pinned: false | |
| short_description: AI Shopping Assistant, Locator & Smart Suggestions | |
| license: mit | |
| # ποΈ RetailGenie β In-Store Smart Assistant | |
| **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**. | |
| > β οΈ This project is for **educational and demonstration purposes only**. Product data is mock/simulated and may not reflect real-time inventory. | |
| --- | |
| ## π Try Live on Hugging Face | |
| RetailGenie is live and accessible via Hugging Face Spaces: | |
| π [**Launch RetailGenie on Hugging Face Spaces**](https://huggingface.co/spaces/raviix46/RetailGenie) | |
| No setup needed β just visit and start exploring! | |
| --- | |
| ## β¨ Key Features | |
| ### π§ Navigator Tab | |
| - Multi-level dropdown filters: | |
| - Country β State β City β Store β Category β Product β Brand | |
| - Displays: | |
| - β Availability | |
| - π° Price | |
| - π¬ Floor, πͺ Aisle | |
| - π Offers | |
| - Data is dynamically loaded from nested `.csv` files | |
| ### π§ Smart Suggestions Tab | |
| - Accepts natural language queries like: | |
| - `"gift under 500"`, `"shampoo for dry hair"` | |
| - Filters products based on: | |
| - Price limits | |
| - Tags (dry, oily, gift, budget, etc.) | |
| - Stock status | |
| - Response is generated using: | |
| - `google/flan-t5-small` via Hugging Face Transformers | |
| - Fallback to hardcoded suggestions if no match is found | |
| --- | |
| ## π§ System Architecture | |
| ```text | |
| User Input (Dropdown / Text) | |
| β | |
| βββ Navigator Tab β File system path chaining β Data lookup β Result | |
| βββ Smart Suggestions β Rule filters + model call β Generated response | |
| --- | |
| ## π οΈ Tech Stack | |
| | Category | Tool / Library | Purpose | | |
| |---------------------|--------------------------------------|----------------------------------------------| | |
| | **Programming Language** | Python 3.10 | Core backend logic and data handling | | |
| | **Frontend Framework** | Gradio | Web UI with tabs, dropdowns, and text input | | |
| | **NLP Model** | google/flan-t5-small (via π€ Transformers) | Natural language product recommendations | | |
| | **Data Handling** | Pandas | Reading, filtering, and managing CSV data | | |
| | **Deployment** | Hugging Face Spaces | Hosting and public access to the app | | |
| | **UI Styling** | HTML, CSS (via Gradio Markdown) | Custom styling for layout and response boxes | | |
| | **Fallback Logic** | Python conditionals + emoji formatting | Default suggestions when model fails | | |
| --- | |
| ## π Example Queries and Outputs | |
| ### πΉ Smart Suggestions Tab (Natural Language) | |
| | π¬ User Query | π€ AI Response (Sample) | | |
| |------------------------------------------|--------------------------------------------------------------------------------| | |
| | `shampoo for dry hair under 300` | "You may try Dove Dryness Repair β βΉ280, available at Floor 1, Aisle 3." | | |
| | `gift for brother under 500` | "A perfect gift is our Menβs Grooming Kit β βΉ450, available at Floor 2, Aisle 5." | | |
| | `budget skincare for oily skin` | "Try Clean & Clear Oil Control Face Wash β βΉ150, available at Floor 1, Aisle 2." | | |
| | `face cream above 700` | "You might like Olay Regenerist β βΉ899, found at Floor 3, Aisle 7." | | |
| ### πΉ Navigator Tab (Dropdowns) | |
| Sample user path: | |
| ``` | |
| Country β India | |
| β State β Karnataka | |
| β City β Bangalore | |
| β Store β StoreA | |
| β Category β Shampoo | |
| β Product β Dove | |
| β Brand β Dryness Repair | |
| β Quantity β 500ml | |
| ``` | |
| **Output:** | |
| ``` | |
| β In Stock: Yes | |
| π° Price: βΉ280 | |
| π¬ Floor: 1 | |
| πͺ Aisle: 3 | |
| π Offer: Buy 1 Get 1 Free | |
| ``` | |
| --- | |
| ## π§ͺ Run Locally | |
| Follow the steps below to set up and run RetailGenie on your machine: | |
| ### 1. Clone the Repository | |
| ```bash | |
| git clone https://github.com/your_username/RetailGenie.git | |
| cd RetailGenie | |
| ``` | |
| ### 2. Install Dependencies | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| ### 3. Launch the App | |
| ```bash | |
| python app.py | |
| ``` | |
| The app will be available at `http://localhost:7860/` |