--- title: L'Atelier du Fer - Catalog Search emoji: 🔍 colorFrom: indigo colorTo: blue sdk: gradio sdk_version: 5.29.0 app_file: app.py pinned: false license: apache-2.0 short_description: Search app for L'Atelier du Fer catalog --- # L'Atelier du Fer - Catalog Search This application allows users to search for items in the decorative ironwork catalog of L'Atelier du Fer. It uses artificial intelligence to understand textual descriptions and analyze images to find the most relevant items. ## Features ### For Customers - Search for items by text description - Search for items by image - Combined search (text + image) - Display of results as thumbnails with image, title, description, price, and link to the product page ### For Staff - Quick identification of an item from a photo - Display of detailed item information (price, reference, etc.) ## Technologies Used - Python 3.13.3 - Gradio for the user interface - OpenAI GPT-4.1 for text and image analysis - MongoDB Atlas Vector Search for vector search - LangChain for component orchestration ## Local Installation 1. Clone the repository: ```bash git clone https://github.com/your-organization/adf-chatbot2.git cd adf-chatbot2 ``` 2. Install dependencies with uv: ```bash uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e . ``` 3. Create a `.env` file at the root of the project with the following variables: ``` OPENAI_API_KEY=your_openai_api_key MONGODB_URI=your_mongodb_atlas_uri ``` 4. Launch the application: ```bash python app.py ``` ## Deployment on Hugging Face Spaces 1. Fork this repository on GitHub 2. Create a new Space on Hugging Face 3. Select "GitHub" as the code source 4. Select your fork of the repository 5. Add the following secrets in the Space settings: - `OPENAI_API_KEY`: Your OpenAI API key - `MONGODB_URI`: Your MongoDB Atlas URI ## Project Structure - `app.py`: Application entry point - `src/`: Application source code - `database/`: Database connection module - `image/`: Image processing module - `search/`: Vector search module - `ui/`: Gradio user interface module - `utils/`: Utilities and constants - `tests/`: Unit tests ## Running Tests To run all unit tests: ```bash uv run -m unittest discover tests ``` ## License This project is licensed under Apache 2.0. See the LICENSE file for more details.