This project implements an AI-powered search system for e-commerce platform using the Gemini language model.
- Clone the repository
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
- Install dependencies:
pip install -r requirements.txt
- Set up the database:
python scripts/init_db.py
- Set your Gemini API key as an environment variable:
export GEMINI_API_KEY=your_api_key_here
- Set up the database:
- Set the PYTHONPATH and run the initialization script:
export PYTHONPATH=$PYTHONPATH:/home/ubuntu/git/SearchAI
- Run:
python -m app.scripts.init_db
- Set the PYTHONPATH and run the initialization script:
- Run the application:
python run.py
Send a POST request to /search
with a JSON body containing the query
field:
{
"query": "I need a birthday gift for a 5-year-old boy who likes dinosaurs"
}